|
1 | 1 | name: CI |
2 | 2 | on: |
3 | | - push: |
4 | | - branches: |
5 | | - - main |
6 | | - - "!dependabot/**" |
7 | | - pull_request: |
8 | | - workflow_dispatch: |
| 3 | + [push, pull_request, workflow_dispatch] |
| 4 | + |
9 | 5 | jobs: |
10 | | - jest: |
11 | | - name: Jest (Node v${{ matrix.node }}) |
12 | | - runs-on: ubuntu-latest |
13 | | - strategy: |
14 | | - fail-fast: false |
15 | | - matrix: |
16 | | - node: [14, 16, 17] |
17 | | - steps: |
18 | | - - name: Checkout |
19 | | - uses: actions/checkout@v3 |
20 | | - - name: Load Node version ${{ matrix.node }} |
21 | | - uses: actions/setup-node@v3 |
22 | | - with: |
23 | | - node-version: ${{ matrix.node }} |
24 | | - cache: npm |
25 | | - - name: Npm Install |
26 | | - run: npm ci |
27 | | - - name: Run Jest |
28 | | - run: npm run test:ci |
29 | | - - name: Run Coveralls |
30 | | - uses: coverallsapp/github-action@1.1.3 |
31 | | - if: matrix.node == '16' |
32 | | - with: |
33 | | - github-token: ${{ secrets.GITHUB_TOKEN }} |
34 | | - path-to-lcov: ./reports/lcov.info |
| 6 | + tests: |
| 7 | + uses: ljharb/actions/.github/workflows/node.yml@a840bfaa7e24d260a9f451baa97ca172fdb327af |
| 8 | + with: |
| 9 | + range: '>= 0.8' |
| 10 | + type: majors |
| 11 | + build-command: npm run build:tests |
| 12 | + build-output-dir: __tests-built__,lib |
| 13 | + command: npm run tests-built |
| 14 | + |
35 | 15 | flow: |
36 | 16 | name: Flow type checking |
37 | 17 | runs-on: ubuntu-latest |
38 | 18 | steps: |
39 | | - - name: Checkout |
40 | | - uses: actions/checkout@v3 |
41 | | - - name: Load Node |
42 | | - uses: actions/setup-node@v3 |
| 19 | + - uses: actions/checkout@v4 |
| 20 | + - uses: ljharb/actions/node/install@a840bfaa7e24d260a9f451baa97ca172fdb327af |
43 | 21 | with: |
44 | | - cache: npm |
45 | | - - name: Npm Install |
46 | | - run: npm ci |
| 22 | + use-npm-ci: true |
47 | 23 | - name: Flow type check |
48 | 24 | run: npm run flow |
| 25 | + |
49 | 26 | eslint: |
50 | | - name: ESLint (Node v${{ matrix.node }}) |
| 27 | + name: ESLint |
51 | 28 | runs-on: ubuntu-latest |
52 | | - strategy: |
53 | | - matrix: |
54 | | - node: [16] |
55 | 29 | steps: |
56 | | - - name: Checkout |
57 | | - uses: actions/checkout@v3 |
58 | | - - name: Load Node version ${{ matrix.node }} |
59 | | - uses: actions/setup-node@v3 |
| 30 | + - uses: actions/checkout@v4 |
| 31 | + - uses: ljharb/actions/node/install@a840bfaa7e24d260a9f451baa97ca172fdb327af |
60 | 32 | with: |
61 | | - node-version: ${{ matrix.node }} |
62 | | - cache: npm |
63 | | - - name: Npm Install |
64 | | - run: npm ci |
| 33 | + use-npm-ci: true |
65 | 34 | - name: Run ESLint |
66 | 35 | run: npm run lint |
| 36 | + |
67 | 37 | diff-breakUpAriaJSON: |
68 | 38 | name: Compare JSON to src output |
69 | 39 | runs-on: ubuntu-latest |
70 | 40 | steps: |
71 | | - - name: Checkout |
72 | | - uses: actions/checkout@v3 |
73 | | - - name: Load Node version |
74 | | - uses: actions/setup-node@v3 |
| 41 | + - uses: actions/checkout@v4 |
| 42 | + - uses: ljharb/actions/node/install@a840bfaa7e24d260a9f451baa97ca172fdb327af |
75 | 43 | with: |
76 | | - cache: npm |
77 | | - - name: Npm Install |
78 | | - run: npm ci |
| 44 | + use-npm-ci: true |
79 | 45 | - name: Run diff check for the breakUpAriaJSON script |
80 | 46 | run: node scripts/buildModelModules.js && git diff --exit-code -- src |
0 commit comments