mirror of
https://github.com/nasa/openmct.git
synced 2024-12-23 15:02:23 +00:00
1bde4c9a0c
* Update all unit test packages, set node engine rules, new circleci workflow Co-authored-by: unlikelyzero <jchill2@gmail.com> Co-authored-by: Andrew Henry <akhenry@gmail.com>
70 lines
2.0 KiB
YAML
70 lines
2.0 KiB
YAML
version: 2.1
|
|
executors:
|
|
linux:
|
|
docker:
|
|
- image: cimg/base:stable
|
|
orbs:
|
|
node: circleci/node@4.5.1
|
|
browser-tools: circleci/browser-tools@1.1.3
|
|
jobs:
|
|
test:
|
|
parameters:
|
|
node-version:
|
|
type: string
|
|
browser:
|
|
type: string
|
|
always-pass:
|
|
type: boolean
|
|
executor: linux
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
key: deps-{{ .Branch }}--<< parameters.node-version >>--{{ checksum "package.json" }}
|
|
- node/install:
|
|
node-version: << parameters.node-version >>
|
|
- node/install-packages:
|
|
override-ci-command: npm install
|
|
- when: # Just to save time until caching saves the browser bin
|
|
condition:
|
|
equal: [ "FirefoxESR", <<parameters.browser>> ]
|
|
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
|
|
condition:
|
|
equal: [ "ChromeHeadless", <<parameters.browser>> ]
|
|
steps:
|
|
- browser-tools/install-chrome:
|
|
replace-existing: false
|
|
- save_cache:
|
|
key: deps-{{ .Branch }}--<< parameters.node-version >>--{{ checksum "package.json" }}
|
|
paths:
|
|
- ~/.npm
|
|
- ~/.cache
|
|
- node_modules
|
|
- run: npm run test:coverage -- --browsers=<<parameters.browser>> || <<parameters.always-pass>>
|
|
- store_test_results:
|
|
path: dist/reports/tests/
|
|
- store_artifacts:
|
|
path: dist/reports/
|
|
workflows:
|
|
matrix-tests:
|
|
jobs:
|
|
- test:
|
|
name: node10-chrome
|
|
node-version: lts/dubnium
|
|
browser: ChromeHeadless
|
|
always-pass: false
|
|
- test:
|
|
name: node12-firefoxESR
|
|
node-version: lts/erbium
|
|
browser: FirefoxESR
|
|
always-pass: true
|
|
- test:
|
|
name: node14-chrome
|
|
node-version: lts/fermium
|
|
browser: ChromeHeadless
|
|
always-pass: true
|
|
|
|
|