|
1 | 1 | name: CI
|
2 |
| -on: pull_request |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + - release-* |
| 8 | + pull_request: |
| 9 | + branches: |
| 10 | + - master |
| 11 | + - release-* |
3 | 12 |
|
4 | 13 | jobs:
|
5 |
| - test: |
| 14 | + ci: |
6 | 15 | runs-on: ubuntu-latest
|
7 | 16 |
|
| 17 | + strategy: |
| 18 | + matrix: |
| 19 | + node-version: [10.x, 12.x, 14.x] |
| 20 | + |
8 | 21 | steps:
|
9 |
| - - uses: actions/checkout@v1 |
10 |
| - - uses: actions/setup-node@v1 |
11 |
| - with: |
12 |
| - node-version: "14.x" |
13 |
| - - name: Setup Testing Infra |
14 |
| - run: | |
15 |
| - cd test |
16 |
| - npm install |
17 |
| -
|
18 |
| - - name: "CommonJS Test" |
19 |
| - run: | |
20 |
| - cd test/cjs |
21 |
| - npm run test |
22 |
| -
|
23 |
| - - name: "ES Modules Test" |
24 |
| - run: | |
25 |
| - cd test/esm-node-native |
26 |
| - npm run test |
27 |
| -
|
28 |
| - - name: "Rollup Tree-shaking Test" |
29 |
| - run: | |
30 |
| - cd test/rollup-modules |
31 |
| - npm run test |
32 |
| -
|
33 |
| - - name: "Webpack Tree-shaking Test" |
34 |
| - run: | |
35 |
| - cd test/webpack-modules |
36 |
| - npm run test |
37 |
| -
|
38 |
| - - name: "Snowpack Tree-shaking Test" |
39 |
| - run: | |
40 |
| - cd test/snowpack-modules |
41 |
| - npm run test |
| 22 | + - uses: actions/checkout@v2 |
| 23 | + |
| 24 | + - name: Use node version ${{ matrix.node-version }} |
| 25 | + uses: actions/setup-node@v1 |
| 26 | + with: |
| 27 | + node-version: ${{ matrix.node-version }} |
| 28 | + |
| 29 | + - name: Setup Testing Infra |
| 30 | + run: | |
| 31 | + cd test |
| 32 | + npm install |
| 33 | +
|
| 34 | + - name: "CommonJS Test" |
| 35 | + run: | |
| 36 | + cd test/cjs |
| 37 | + npm run test |
| 38 | +
|
| 39 | + - name: "ES Modules Test" |
| 40 | + run: | |
| 41 | + cd test/esm-node-native |
| 42 | + npm run test |
| 43 | + if: ${{ matrix.node-version == "14.x" }} |
| 44 | + |
| 45 | + - name: "Validate ES Modules == CommonJS" |
| 46 | + run: | |
| 47 | + cd test/validateModuleExportsMatchCommonJS |
| 48 | + npm run test |
| 49 | + if: ${{ matrix.node-version == "14.x" }} |
| 50 | + |
| 51 | + - name: "Rollup Tree-shaking Test" |
| 52 | + run: | |
| 53 | + cd test/rollup-modules |
| 54 | + npm run test |
| 55 | +
|
| 56 | + - name: "Webpack Tree-shaking Test" |
| 57 | + run: | |
| 58 | + cd test/webpack-modules |
| 59 | + npm run test |
| 60 | +
|
| 61 | + - name: "Snowpack Tree-shaking Test" |
| 62 | + run: | |
| 63 | + cd test/snowpack-modules |
| 64 | + npm run test |
0 commit comments