|
1 | | -version: 2 |
| 1 | +version: 2.1 |
2 | 2 |
|
3 | 3 | workflows: |
4 | | - version: 2 |
5 | | - test: |
| 4 | + build-and-test-all: |
6 | 5 | jobs: |
7 | | - - oldest-long-term-support-release |
8 | | - - current-release |
9 | | - |
10 | | -node-template: &node-template |
11 | | - steps: |
12 | | - - checkout |
13 | | - - run: echo "Node version:" `node --version` |
14 | | - - run: npm install |
15 | | - - run: npm run lint |
16 | | - - run: |
17 | | - command: npm test |
18 | | - environment: |
19 | | - JEST_JUNIT_OUTPUT: "reports/junit/js-test-results.xml" |
20 | | - - store_test_results: |
21 | | - path: reports/junit |
22 | | - - run: npm run check-typescript |
23 | | - - store_artifacts: |
24 | | - path: reports/junit |
| 6 | + # CircleCI's current generation of Node images, cimg/node, allow you to leave the |
| 7 | + # patch version unpinned, but require you to specify the minor version. The one |
| 8 | + # exception is cimg/node:current, which will always give us the latest release in |
| 9 | + # the latest major version-- and the latest major version is where it's most likely |
| 10 | + # that there would be a new minor version, anyway. |
| 11 | + - build-test-linux: |
| 12 | + name: latest Node version |
| 13 | + docker-image: cimg/node:current |
| 14 | + run-lint: true |
| 15 | + - build-test-linux: |
| 16 | + name: Node 16.3 |
| 17 | + docker-image: cimg/node:16.3 |
| 18 | + - build-test-linux: |
| 19 | + name: Node 15.14 |
| 20 | + docker-image: cimg/node:15.14 |
| 21 | + - build-test-linux: |
| 22 | + name: Node 14.17 |
| 23 | + docker-image: cimg/node:14.17 |
| 24 | + - build-test-linux: |
| 25 | + name: Node 13.14 |
| 26 | + docker-image: cimg/node:13.14 |
| 27 | + - build-test-linux: |
| 28 | + name: Node 12.22 |
| 29 | + docker-image: cimg/node:12.22 |
25 | 30 |
|
26 | 31 | jobs: |
27 | | - oldest-long-term-support-release: |
28 | | - <<: *node-template |
29 | | - docker: |
30 | | - - image: circleci/node:6 |
31 | | - - image: amazon/dynamodb-local |
32 | | - |
33 | | - current-release: |
34 | | - <<: *node-template |
| 32 | + build-test-linux: |
| 33 | + parameters: |
| 34 | + run-lint: |
| 35 | + type: boolean |
| 36 | + default: false |
| 37 | + docker-image: |
| 38 | + type: string |
35 | 39 | docker: |
36 | | - - image: circleci/node:latest |
| 40 | + - image: <<parameters.docker-image>> |
37 | 41 | - image: amazon/dynamodb-local |
| 42 | + steps: |
| 43 | + - checkout |
| 44 | + - run: echo "Node version:" `node --version` |
| 45 | + - run: npm install |
| 46 | + - run: |
| 47 | + command: npm test |
| 48 | + environment: |
| 49 | + JEST_JUNIT_OUTPUT: "reports/junit/js-test-results.xml" |
| 50 | + - run: npm run check-typescript |
| 51 | + - when: |
| 52 | + condition: <<parameters.run-lint>> |
| 53 | + steps: |
| 54 | + - run: npm run lint |
| 55 | + - store_test_results: |
| 56 | + path: reports/junit |
| 57 | + - store_artifacts: |
| 58 | + path: reports/junit |
0 commit comments