|
86 | 86 | target: src/all-e2e-logs.tgz
|
87 | 87 | source_dir: src/packages/compass-e2e-tests/.log
|
88 | 88 | include:
|
89 |
| - - "**" |
| 89 | + - '**' |
90 | 90 | - command: s3.put
|
91 | 91 | params:
|
92 | 92 | <<: *save-artifact-params-private
|
@@ -203,6 +203,15 @@ functions:
|
203 | 203 | # Install dependencies
|
204 | 204 | bash ".evergreen/retry-with-backoff.sh" .evergreen/npm_ci.sh
|
205 | 205 |
|
| 206 | + # Will fail if versions of direct dependencies listed in package-lock |
| 207 | + # are not matching versions defined in package.json file of any of the |
| 208 | + # workspace packages |
| 209 | + # This command is very noisy when running from root with --all, store |
| 210 | + # the output in a file that will be uploaded with rest of the logs |
| 211 | + LS_ALL_STDOUT_FILE="$(npm config get cache)/_logs/$(date -u +"%Y-%m-%dT%H_%M_%SZ")-npm-ls-all.log" |
| 212 | + echo "Validating dependencies with \`npm ls --all\`..." |
| 213 | + (npm ls --all > $LS_ALL_STDOUT_FILE && echo "No mismatched dependency versions") || echo "\nThe \`npm ls\` command failed with mismatched dependencies error. This usually means that the dependency versions listed in package.json are not matching dependencies resolved and recorded in package-lock.json. If you updated package.json files in your PR, inspect the error output and try to re-install offending dependncies to fix the package-lock file." |
| 214 | +
|
206 | 215 | bootstrap:
|
207 | 216 | - command: shell.exec
|
208 | 217 | type: setup
|
@@ -294,7 +303,7 @@ functions:
|
294 | 303 | echo "Running tests in Electron runtime"
|
295 | 304 |
|
296 | 305 | # Preparing native addons for electron runtime
|
297 |
| - npm run --unsafe-perm electron-rebuild |
| 306 | + DEBUG=electron-rebuild* npm run --unsafe-perm electron-rebuild |
298 | 307 |
|
299 | 308 | npm run --unsafe-perm test-ci-electron -- --stream
|
300 | 309 |
|
@@ -588,10 +597,9 @@ functions:
|
588 | 597 | DEBUG: ${debug|}
|
589 | 598 | MONGODB_VERSION: ${mongodb_version|}
|
590 | 599 | MONGODB_RUNNER_VERSION: ${mongodb_version|}
|
591 |
| - E2E_TEST_GROUPS: ${e2e_test_groups} |
592 |
| - E2E_TEST_GROUP: ${e2e_test_group} |
| 600 | + COMPASS_E2E_TEST_GROUPS: ${e2e_test_groups} |
| 601 | + COMPASS_E2E_TEST_GROUP: ${e2e_test_group} |
593 | 602 | ATLAS_LOCAL_VERSION: latest
|
594 |
| - HADRON_DISTRIBUTION: compass |
595 | 603 | script: |
|
596 | 604 | set -e
|
597 | 605 | # Load environment variables
|
@@ -620,8 +628,8 @@ functions:
|
620 | 628 | DEBUG: ${debug|}
|
621 | 629 | MONGODB_VERSION: ${mongodb_version|}
|
622 | 630 | MONGODB_RUNNER_VERSION: ${mongodb_version|}
|
623 |
| - E2E_TEST_GROUPS: ${e2e_test_groups} |
624 |
| - E2E_TEST_GROUP: ${e2e_test_group} |
| 631 | + COMPASS_E2E_TEST_GROUPS: ${e2e_test_groups} |
| 632 | + COMPASS_E2E_TEST_GROUP: ${e2e_test_group} |
625 | 633 | script: |
|
626 | 634 | set -e
|
627 | 635 | # Load environment variables
|
@@ -655,14 +663,50 @@ functions:
|
655 | 663 | DEBUG: ${debug|}
|
656 | 664 | MONGODB_VERSION: ${mongodb_version|}
|
657 | 665 | MONGODB_RUNNER_VERSION: ${mongodb_version|}
|
658 |
| - BROWSER_NAME: ${browser_name} |
659 |
| - E2E_TEST_GROUPS: ${e2e_test_groups} |
660 |
| - E2E_TEST_GROUP: ${e2e_test_group} |
| 666 | + COMPASS_E2E_BROWSER_NAME: ${browser_name} |
| 667 | + COMPASS_E2E_TEST_GROUPS: ${e2e_test_groups} |
| 668 | + COMPASS_E2E_TEST_GROUP: ${e2e_test_group} |
| 669 | + script: | |
| 670 | + set -e |
| 671 | + # Load environment variables |
| 672 | + eval $(.evergreen/print-compass-env.sh) |
| 673 | + npm run --unsafe-perm --workspace compass-e2e-tests test-ci web |
| 674 | +
|
| 675 | + |
| 676 | + test-web-sandbox-atlas-cloud: |
| 677 | + - command: shell.exec |
| 678 | + # It can take a very long time for Atlas cluster to get deployed |
| 679 | + timeout_secs: 2400 |
| 680 | + params: |
| 681 | + working_dir: src |
| 682 | + shell: bash |
| 683 | + env: |
| 684 | + <<: *compass-env |
| 685 | + DEBUG: ${debug|} |
| 686 | + COMPASS_E2E_ATLAS_CLOUD_SANDBOX_CLOUD_CONFIG: 'qa' |
| 687 | + COMPASS_E2E_ATLAS_CLOUD_SANDBOX_USERNAME: ${e2e_tests_compass_web_atlas_username} |
| 688 | + COMPASS_E2E_ATLAS_CLOUD_SANDBOX_PASSWORD: ${e2e_tests_compass_web_atlas_password} |
| 689 | + COMPASS_E2E_ATLAS_CLOUD_SANDBOX_DBUSER_USERNAME: ${e2e_tests_compass_web_atlas_db_username} |
| 690 | + COMPASS_E2E_ATLAS_CLOUD_SANDBOX_DBUSER_PASSWORD: ${e2e_tests_compass_web_atlas_password} |
| 691 | + MCLI_PUBLIC_API_KEY: ${e2e_tests_mcli_public_api_key} |
| 692 | + MCLI_PRIVATE_API_KEY: ${e2e_tests_mcli_private_api_key} |
| 693 | + MCLI_ORG_ID: ${e2e_tests_mcli_org_id} |
| 694 | + MCLI_PROJECT_ID: ${e2e_tests_mcli_project_id} |
| 695 | + MCLI_OPS_MANAGER_URL: ${e2e_tests_mcli_ops_manager_url} |
661 | 696 | script: |
|
662 | 697 | set -e
|
663 | 698 | # Load environment variables
|
664 | 699 | eval $(.evergreen/print-compass-env.sh)
|
665 |
| - npm run --unsafe-perm --workspace compass-e2e-tests test-web |
| 700 | + # Create Atlas cluster for test project |
| 701 | + source .evergreen/start-atlas-cloud-cluster.sh |
| 702 | + # Run the tests |
| 703 | + echo "Starting e2e tests..." |
| 704 | + # We're only running a special subset of tests as provisioning atlas |
| 705 | + # clusters in CI is both pricey and flakey, so we want to limit the |
| 706 | + # coverage to reduce those factors (at least for now) |
| 707 | + npm run --unsafe-perm --workspace compass-e2e-tests test-ci -- -- web \ |
| 708 | + --test-atlas-cloud-sandbox \ |
| 709 | + --test-filter="atlas-cloud/**/*" |
666 | 710 |
|
667 | 711 | test-connectivity:
|
668 | 712 | - command: shell.exec
|
|
0 commit comments