-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into fix-toolbar-7036
- Loading branch information
Showing
960 changed files
with
21,801 additions
and
16,199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,20 +5,20 @@ executors: | |
- image: mcr.microsoft.com/playwright:v1.39.0-focal | ||
environment: | ||
NODE_ENV: development # Needed to ensure 'dist' folder created and devDependencies installed | ||
PERCY_POSTINSTALL_BROWSER: 'true' # Needed to store the percy browser in cache deps | ||
PERCY_LOGLEVEL: 'debug' # Enable DEBUG level logging for Percy (Issue: https://github.com/nasa/openmct/issues/5742) | ||
PERCY_POSTINSTALL_BROWSER: "true" # Needed to store the percy browser in cache deps | ||
PERCY_LOGLEVEL: "debug" # Enable DEBUG level logging for Percy (Issue: https://github.com/nasa/openmct/issues/5742) | ||
ubuntu: | ||
machine: | ||
image: ubuntu-2204:current | ||
docker_layer_caching: true | ||
parameters: | ||
BUST_CACHE: | ||
description: 'Set this with the CircleCI UI Trigger Workflow button (boolean = true) to bust the cache!' | ||
description: "Set this with the CircleCI UI Trigger Workflow button (boolean = true) to bust the cache!" | ||
default: false | ||
type: boolean | ||
commands: | ||
build_and_install: | ||
description: 'All steps used to build and install. Will use cache if found' | ||
description: "All steps used to build and install. Will use cache if found" | ||
parameters: | ||
node-version: | ||
type: string | ||
|
@@ -30,7 +30,7 @@ commands: | |
node-version: << parameters.node-version >> | ||
- run: npm install --no-audit --progress=false | ||
restore_cache_cmd: | ||
description: 'Custom command for restoring cache with the ability to bust cache. When BUST_CACHE is set to true, jobs will not restore cache' | ||
description: "Custom command for restoring cache with the ability to bust cache. When BUST_CACHE is set to true, jobs will not restore cache" | ||
parameters: | ||
node-version: | ||
type: string | ||
|
@@ -42,7 +42,7 @@ commands: | |
- restore_cache: | ||
key: deps--{{ arch }}--{{ .Branch }}--<< parameters.node-version >>--{{ checksum "package.json" }}-{{ checksum ".circleci/config.yml" }} | ||
save_cache_cmd: | ||
description: 'Custom command for saving cache.' | ||
description: "Custom command for saving cache." | ||
parameters: | ||
node-version: | ||
type: string | ||
|
@@ -53,7 +53,7 @@ commands: | |
- ~/.npm | ||
- node_modules | ||
generate_and_store_version_and_filesystem_artifacts: | ||
description: 'Track important packages and files' | ||
description: "Track important packages and files" | ||
steps: | ||
- run: | | ||
[[ $EUID -ne 0 ]] && (sudo mkdir -p /tmp/artifacts && sudo chmod 777 /tmp/artifacts) || (mkdir -p /tmp/artifacts && chmod 777 /tmp/artifacts) | ||
|
@@ -64,7 +64,7 @@ commands: | |
- store_artifacts: | ||
path: /tmp/artifacts/ | ||
generate_e2e_code_cov_report: | ||
description: 'Generate e2e code coverage artifacts and publish to codecov.io. Needed to that we can ignore the exit code status of the npm run test' | ||
description: "Generate e2e code coverage artifacts and publish to codecov.io. Needed to that we can ignore the exit code status of the npm run test" | ||
parameters: | ||
suite: | ||
type: string | ||
|
@@ -120,18 +120,16 @@ jobs: | |
- generate_and_store_version_and_filesystem_artifacts | ||
e2e-test: | ||
parameters: | ||
node-version: | ||
type: string | ||
suite: #stable or full | ||
type: string | ||
executor: pw-focal-development | ||
parallelism: 4 | ||
parallelism: 6 | ||
steps: | ||
- build_and_install: | ||
node-version: <<parameters.node-version>> | ||
node-version: lts/hydrogen | ||
- when: #Only install chrome-beta when running the 'full' suite to save $$$ | ||
condition: | ||
equal: ['full', <<parameters.suite>>] | ||
equal: ["full", <<parameters.suite>>] | ||
steps: | ||
- run: npx playwright install chrome-beta | ||
- run: SHARD="$((${CIRCLE_NODE_INDEX}+1))"; npm run test:e2e:<<parameters.suite>> -- --shard=${SHARD}/${CIRCLE_NODE_TOTAL} | ||
|
@@ -155,13 +153,10 @@ jobs: | |
steps: | ||
- generate_and_store_version_and_filesystem_artifacts | ||
e2e-couchdb: | ||
parameters: | ||
node-version: | ||
type: string | ||
executor: ubuntu | ||
steps: | ||
- build_and_install: | ||
node-version: <<parameters.node-version>> | ||
node-version: lts/hydrogen | ||
- run: npx [email protected] install #Necessary for bare ubuntu machine | ||
- run: | | ||
export $(cat src/plugins/persistence/couch/.env.ci | xargs) | ||
|
@@ -189,15 +184,28 @@ jobs: | |
equal: [42, 42] # Always generate version artifacts regardless of test failure https://discuss.circleci.com/t/make-custom-command-run-always-with-when-always/38957/2 | ||
steps: | ||
- generate_and_store_version_and_filesystem_artifacts | ||
perf-test: | ||
parameters: | ||
node-version: | ||
type: string | ||
mem-test: | ||
executor: pw-focal-development | ||
steps: | ||
- build_and_install: | ||
node-version: <<parameters.node-version>> | ||
node-version: lts/hydrogen | ||
- run: npm run test:perf:memory | ||
- store_test_results: | ||
path: test-results/results.xml | ||
- store_artifacts: | ||
path: test-results | ||
- store_artifacts: | ||
path: html-test-results | ||
- when: | ||
condition: | ||
equal: [42, 42] # Always run codecov reports regardless of test failure https://discuss.circleci.com/t/make-custom-command-run-always-with-when-always/38957/2 | ||
steps: | ||
- generate_and_store_version_and_filesystem_artifacts | ||
perf-test: | ||
executor: pw-focal-development | ||
steps: | ||
- build_and_install: | ||
node-version: lts/hydrogen | ||
- run: npm run test:perf:localhost | ||
- run: npm run test:perf:contract | ||
- store_test_results: | ||
|
@@ -211,16 +219,14 @@ jobs: | |
equal: [42, 42] # Always run codecov reports regardless of test failure https://discuss.circleci.com/t/make-custom-command-run-always-with-when-always/38957/2 | ||
steps: | ||
- generate_and_store_version_and_filesystem_artifacts | ||
visual-test: | ||
visual-a11y-tests: | ||
parameters: | ||
node-version: | ||
type: string | ||
suite: | ||
type: string # ci or full | ||
executor: pw-focal-development | ||
steps: | ||
- build_and_install: | ||
node-version: <<parameters.node-version>> | ||
node-version: lts/hydrogen | ||
- run: npm run test:e2e:visual:<<parameters.suite>> | ||
- store_test_results: | ||
path: test-results/results.xml | ||
|
@@ -237,47 +243,40 @@ workflows: | |
overall-circleci-commit-status: #These jobs run on every commit | ||
jobs: | ||
- lint: | ||
name: node16-lint | ||
node-version: lts/gallium | ||
name: node20-lint | ||
node-version: lts/iron | ||
- unit-test: | ||
name: node18-chrome | ||
node-version: lts/hydrogen | ||
- e2e-test: | ||
name: e2e-stable | ||
node-version: lts/hydrogen | ||
suite: stable | ||
- perf-test: | ||
node-version: lts/hydrogen | ||
- visual-test: | ||
- visual-a11y-tests: | ||
name: visual-test-ci | ||
suite: ci | ||
node-version: lts/hydrogen | ||
|
||
the-nightly: #These jobs do not run on PRs, but against master at night | ||
jobs: | ||
- unit-test: | ||
name: node16-chrome-nightly | ||
node-version: lts/gallium | ||
name: node20-chrome-nightly | ||
node-version: lts/iron | ||
- unit-test: | ||
name: node18-chrome | ||
node-version: lts/hydrogen | ||
- npm-audit: | ||
node-version: lts/hydrogen | ||
- e2e-test: | ||
name: e2e-full-nightly | ||
node-version: lts/hydrogen | ||
suite: full | ||
- perf-test: | ||
node-version: lts/hydrogen | ||
- visual-test: | ||
- mem-test | ||
- perf-test | ||
- visual-a11y-tests: | ||
name: visual-test-nightly | ||
suite: full | ||
node-version: lts/hydrogen | ||
- e2e-couchdb: | ||
node-version: lts/hydrogen | ||
- e2e-couchdb | ||
triggers: | ||
- schedule: | ||
cron: '0 0 * * *' | ||
cron: "0 0 * * *" | ||
filters: | ||
branches: | ||
only: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: 'e2e-perf' | ||
on: | ||
push: | ||
branches: master | ||
workflow_dispatch: | ||
pull_request: | ||
types: | ||
- labeled | ||
- opened | ||
schedule: | ||
- cron: '0 0 * * *' | ||
jobs: | ||
e2e-full: | ||
if: contains(github.event.pull_request.labels.*.name, 'pr:e2e:perf') || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 'lts/hydrogen' | ||
|
||
- name: Cache NPM dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- run: npx [email protected] install | ||
- run: npm install --cache ~/.npm --no-audit --progress=false | ||
- run: npm run test:perf:localhost | ||
- run: npm run test:perf:contract | ||
- run: npm run test:perf:memory | ||
- name: Archive test results | ||
if: success() || failure() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: test-results | ||
|
||
- name: Remove pr:e2e:perf label (if present) | ||
if: always() | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const { owner, repo, number } = context.issue; | ||
const labelToRemove = 'pr:e2e:perf'; | ||
try { | ||
await github.rest.issues.removeLabel({ | ||
owner, | ||
repo, | ||
issue_number: number, | ||
name: labelToRemove | ||
}); | ||
} catch (error) { | ||
core.warning(`Failed to remove ' + labelToRemove + ' label: ${error.message}`); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.