diff --git a/.circleci/config.yml b/.circleci/config.yml index 59adff36e2..b64894f5b5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,8 +13,6 @@ jobs: type: string browser: type: string - always-pass: - type: boolean executor: linux steps: - checkout @@ -24,13 +22,18 @@ jobs: node-version: << parameters.node-version >> - node/install-packages: override-ci-command: npm install - - when: # Just to save time until caching saves the browser bin + - when: condition: equal: [ "FirefoxESR", <> ] steps: - browser-tools/install-firefox: - version: "78.11.0esr" #https://archive.mozilla.org/pub/firefox/releases/ - - when: # Just to save time until caching saves the browser bin + version: "91.2.0esr" #https://archive.mozilla.org/pub/firefox/releases/ + - when: + condition: + equal: [ "Firefox", <> ] + steps: + - browser-tools/install-firefox + - when: condition: equal: [ "ChromeHeadless", <> ] steps: @@ -42,47 +45,53 @@ jobs: - ~/.npm - ~/.cache - node_modules - - run: npm run lint - - run: npm run test:coverage -- --browsers=<> || <> - - store_test_results: - path: dist/reports/tests/ - - store_artifacts: - path: dist/reports/ + - when: + condition: + equal: [ "", <> ] #Only run linting when browsers are not running to save time + steps: + - run: npm run lint + - when: + condition: << parameters.browser >> #Truthy evaluation to only run when browser is specified + steps: + - run: npm run test:coverage -- --browsers=<> + - store_test_results: + path: dist/reports/tests/ + - store_artifacts: + path: dist/reports/ workflows: matrix-tests: jobs: - test: + post-steps: + - run: + command: + curl -Os https://uploader.codecov.io/latest/linux/codecov;chmod +x codecov;./codecov name: node10-chrome node-version: lts/dubnium browser: ChromeHeadless - always-pass: false - test: - name: node12-firefoxESR-build-only + name: node12-build-only node-version: lts/erbium - browser: FirefoxESR - always-pass: true - - test: - name: node14-chrome-build-only + browser: "" #Skip testing + - test: + name: node14-build-only node-version: lts/fermium - browser: ChromeHeadless - always-pass: true + browser: "" #Skip testing + nightly: jobs: - test: name: node10-chrome-nightly node-version: lts/dubnium browser: ChromeHeadless - always-pass: false - test: name: node12-firefoxESR-nightly node-version: lts/erbium browser: FirefoxESR - always-pass: false - test: - name: node14-chrome-nightly + name: node14-firefox-nightly node-version: lts/fermium - browser: ChromeHeadless - always-pass: false + browser: Firefox triggers: - schedule: cron: "0 0 * * *" diff --git a/.gitignore b/.gitignore index 76bb23dc5c..e6e7c6e671 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,6 @@ report.*.json .lighthouseci package-lock.json + +#codecov artifacts +codecov diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000000..45aa9a9624 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,20 @@ +codecov: + require_ci_to_pass: false + +coverage: + precision: 2 + round: down + range: "70...100" + +parsers: + gcov: + branch_detection: + conditional: yes + loop: yes + method: no + macro: no + +comment: + layout: "reach,diff,flags,files,footer" + behavior: default + require_changes: false