Skip to content

Commit

Permalink
DEVPROD-5136: Add testing (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
sophstad authored Mar 26, 2024
1 parent 9532d1b commit bbf9380
Show file tree
Hide file tree
Showing 19 changed files with 762 additions and 1,221 deletions.
170 changes: 170 additions & 0 deletions .evergreen/attach.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
functions:
attach-codegen-diff:
command: s3.put
type: system
params:
aws_key: ${AWS_ACCESS_KEY_ID}
aws_secret: ${AWS_SECRET_ACCESS_KEY}
aws_session_token: ${AWS_SESSION_TOKEN}
local_files_include_filter: ["ui/${app_dir}/bin/codegen.diff"]
remote_file: ${build_variant}/${task_id}/${execution}/codegen/
bucket: evg-bucket-evergreen-ui
content_type: text/plain
permissions: public-read

attach-cypress-results:
- command: s3.put
type: system
params:
aws_key: ${AWS_ACCESS_KEY_ID}
aws_secret: ${AWS_SECRET_ACCESS_KEY}
aws_session_token: ${AWS_SESSION_TOKEN}
local_files_include_filter: ["ui/${app_dir}/cypress/screenshots/*"]
remote_file: ${build_variant}/${task_id}/${execution}/
bucket: evg-bucket-evergreen-ui
content_type: image/png
permissions: public-read
display_name: "screenshot:"
- command: s3.put
type: system
params:
aws_key: ${AWS_ACCESS_KEY_ID}
aws_secret: ${AWS_SECRET_ACCESS_KEY}
aws_session_token: ${AWS_SESSION_TOKEN}
local_files_include_filter: ["ui/${app_dir}/cypress/videos/*"]
remote_file: ${build_variant}/${task_id}/${execution}/
bucket: evg-bucket-evergreen-ui
content_type: video/mp4
permissions: public-read
display_name: "video:"
- command: attach.xunit_results
params:
files:
- "./ui/${app_dir}/bin/cypress/*.xml"

attach-email:
command: s3.put
type: system
params:
aws_key: ${AWS_ACCESS_KEY_ID}
aws_secret: ${AWS_SECRET_ACCESS_KEY}
aws_session_token: ${AWS_SESSION_TOKEN}
local_files_include_filter: ["ui/${app_dir}/body.txt"]
remote_file: ${build_variant}/${task_id}/${execution}/
bucket: evg-bucket-evergreen-ui
content_type: text/plain
permissions: public-read

attach-logkeeper-logs:
command: s3.put
type: system
params:
aws_key: ${AWS_ACCESS_KEY_ID}
aws_secret: ${AWS_SECRET_ACCESS_KEY}
aws_session_token: ${AWS_SESSION_TOKEN}
local_file: ui/${app_dir}/logkeeper/logkeeperapp.log
remote_file: ${build_variant}/${task_id}/${execution}/logkeeperapp.log
bucket: evg-bucket-evergreen-ui
content_type: text/plain
permissions: public-read

attach-source-map:
command: s3.put
type: system
params:
aws_key: ${AWS_ACCESS_KEY_ID}
aws_secret: ${AWS_SECRET_ACCESS_KEY}
aws_session_token: ${AWS_SESSION_TOKEN}
local_file: "ui/${app_dir}/build/source_map.html"
remote_file: ${build_variant}/${task_id}/${execution}/source_map.html
bucket: evg-bucket-evergreen-ui
content_type: text/html
permissions: public-read
display_name: source_map

attach-storybook:
- command: s3.put
type: system
params:
aws_key: ${AWS_ACCESS_KEY_ID}
aws_secret: ${AWS_SECRET_ACCESS_KEY}
aws_session_token: ${AWS_SESSION_TOKEN}
local_files_include_filter: ["ui/${app_dir}/storybook-static/*.html"]
remote_file: ${build_variant}/${task_id}/${execution}/storybook/
bucket: evg-bucket-evergreen-ui
content_type: text/html
permissions: public-read
preserve_path: true
- command: s3.put
type: system
params:
aws_key: ${AWS_ACCESS_KEY_ID}
aws_secret: ${AWS_SECRET_ACCESS_KEY}
aws_session_token: ${AWS_SESSION_TOKEN}
local_files_include_filter:
[
"ui/${app_dir}/storybook-static/**/*.js$",
"ui/${app_dir}/storybook-static/**/*.mjs$",
]
remote_file: ${build_variant}/${task_id}/${execution}/storybook/
bucket: evg-bucket-evergreen-ui
content_type: application/javascript
permissions: public-read
preserve_path: true
- command: s3.put
type: system
params:
aws_key: ${AWS_ACCESS_KEY_ID}
aws_secret: ${AWS_SECRET_ACCESS_KEY}
aws_session_token: ${AWS_SESSION_TOKEN}
local_files_include_filter: ["ui/${app_dir}/storybook-static/**/*.js.map"]
remote_file: ${build_variant}/${task_id}/${execution}/storybook/
bucket: evg-bucket-evergreen-ui
content_type: application/json
permissions: public-read
preserve_path: true
- command: s3.put
type: system
params:
aws_key: ${AWS_ACCESS_KEY_ID}
aws_secret: ${AWS_SECRET_ACCESS_KEY}
aws_session_token: ${AWS_SESSION_TOKEN}
local_files_include_filter: ["ui/${app_dir}/storybook-static/**/*.css"]
remote_file: ${build_variant}/${task_id}/${execution}/storybook/
bucket: evg-bucket-evergreen-ui
content_type: text/css
permissions: public-read
preserve_path: true
- command: s3.put
type: system
params:
aws_key: ${AWS_ACCESS_KEY_ID}
aws_secret: ${AWS_SECRET_ACCESS_KEY}
aws_session_token: ${AWS_SESSION_TOKEN}
local_files_include_filter: ["ui/${app_dir}/storybook-static/**/*.json"]
remote_file: ${build_variant}/${task_id}/${execution}/storybook/
bucket: evg-bucket-evergreen-ui
content_type: application/json
permissions: public-read
preserve_path: true
- command: s3.put
type: system
params:
aws_key: ${AWS_ACCESS_KEY_ID}
aws_secret: ${AWS_SECRET_ACCESS_KEY}
aws_session_token: ${AWS_SESSION_TOKEN}
local_files_include_filter: [
"ui/${app_dir}/storybook-static/**/*.woff",
"ui/${app_dir}/storybook-static/**/*.woff2"
]
remote_file: ${build_variant}/${task_id}/${execution}/storybook/
bucket: evg-bucket-evergreen-ui
content_type: font/woff2
permissions: public-read
preserve_path: true

attach-test-results:
command: attach.xunit_results
params:
files:
- "./ui/${app_dir}/bin/jest/*.xml"
100 changes: 100 additions & 0 deletions .evergreen/evergreen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
command_type: test

ignore:
- "*.md"
- ".github/*"

modules:
- name: evergreen
owner: evergreen-ci
repo: evergreen
branch: main
auto_update: true
- name: logkeeper
owner: evergreen-ci
repo: logkeeper
branch: main
auto_update: true

pre:
- func: assume-ec2-role
- func: get-project
- func: setup-node
- func: yarn-install

post:
- func: assume-ec2-role
- func: attach-codegen-diff
- func: attach-cypress-results
- func: attach-email
- func: attach-logkeeper-logs
- func: attach-source-map
- func: attach-storybook
- func: attach-test-results

include:
- filename: .evergreen/shared.yml
- filename: .evergreen/attach.yml

buildvariants:
- name: spruce
display_name: Spruce
run_on:
- ubuntu2204-large
expansions:
app_dir: apps/spruce
goroot: /opt/golang/go1.20
mongodb_tools_url: https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-x86_64-100.8.0.tgz
mongodb_url_2204: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-7.0.2.tgz
mongosh_url_2204: https://downloads.mongodb.com/compass/mongosh-2.0.2-linux-x64.tgz
node_version: 20.10.0
modules:
- evergreen
- logkeeper
tasks:
- name: check_codegen
- name: compile
- name: e2e_test_spruce
- name: lint
- name: snapshots
- name: storybook
- name: test
- name: type_check
- name: deploy_prod_spruce
git_tag_only: true
patchable: false
priority: 100

- name: parsley
display_name: Parsley
expansions:
app_dir: apps/parsley
goroot: /opt/golang/go1.20
mongodb_tools_url: https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-x86_64-100.8.0.tgz
mongodb_url_2204: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-7.0.2.tgz
mongosh_url_2204: https://downloads.mongodb.com/compass/mongosh-2.0.2-linux-x64.tgz
node_version: 20.10.0
run_on:
- ubuntu2204-large
- ubuntu2204-small
modules:
- evergreen
- logkeeper
tasks:
- name: check_codegen
- name: compile
- name: e2e_test_parsley
- name: lint
- name: snapshots
- name: storybook
- name: test
- name: type_check
- name: deploy_prod_parsley
git_tag_only: true
patchable: false
priority: 100

parameters:
- key: cypress_spec
value: cypress/integration/**/*
description: Specify the Cypress spec files to run for user submitted patches running the e2e_test task.
Loading

0 comments on commit bbf9380

Please sign in to comment.