|
1 | 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node |
2 | 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions |
3 | 3 |
|
4 | | -name: Test |
| 4 | +name: Tests |
5 | 5 |
|
6 | 6 | on: |
7 | 7 | push: |
|
10 | 10 | branches: [main] |
11 | 11 |
|
12 | 12 | jobs: |
13 | | - lint-js: |
14 | | - name: Lint JS |
| 13 | + test: |
| 14 | + name: Unit tests |
15 | 15 | runs-on: ubuntu-latest |
16 | 16 | steps: |
17 | | - - name: Checkout code |
18 | | - uses: actions/checkout@v6 |
19 | | - - name: Lint JS |
20 | | - run: npx --yes oxlint@latest -D perf |
| 17 | + - uses: actions/checkout@v6 |
| 18 | + - name: Use Node.js |
| 19 | + uses: actions/setup-node@v6 |
| 20 | + with: |
| 21 | + node-version: 22 |
| 22 | + - run: npm ci --ignore-scripts --no-audit --no-fund |
| 23 | + - run: npm test |
| 24 | + - name: Upload coverage reports to Codecov |
| 25 | + uses: codecov/codecov-action@v5.5.2 |
| 26 | + with: |
| 27 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 28 | + slug: projectwallace/css-code-quality |
21 | 29 |
|
22 | | - lint-package: |
23 | | - name: Lint package |
| 30 | + check: |
| 31 | + name: Check types |
24 | 32 | runs-on: ubuntu-latest |
25 | 33 | steps: |
26 | | - - name: Checkout code |
27 | | - uses: actions/checkout@v6 |
| 34 | + - uses: actions/checkout@v6 |
28 | 35 | - name: Use Node.js |
29 | 36 | uses: actions/setup-node@v6 |
30 | 37 | with: |
31 | | - cache: npm |
32 | | - - run: npm install --no-fund --no-audit --ignore-scripts |
| 38 | + node-version: 22 |
| 39 | + - run: npm ci --ignore-scripts --no-audit --no-fund |
| 40 | + - run: npm run check |
| 41 | + |
| 42 | + build: |
| 43 | + name: Build |
| 44 | + runs-on: ubuntu-latest |
| 45 | + steps: |
| 46 | + - uses: actions/checkout@v6 |
| 47 | + - name: Use Node.js |
| 48 | + uses: actions/setup-node@v6 |
| 49 | + with: |
| 50 | + node-version: 22 |
| 51 | + - run: npm ci --ignore-scripts --no-audit --no-fund |
33 | 52 | - run: npm run build |
34 | | - - name: Run publint |
35 | | - run: npx --yes publint |
36 | 53 |
|
37 | | - check-types: |
38 | | - name: Check types |
| 54 | + lint: |
| 55 | + name: Lint |
39 | 56 | runs-on: ubuntu-latest |
40 | 57 | steps: |
41 | 58 | - name: Checkout code |
42 | 59 | uses: actions/checkout@v6 |
43 | 60 | - name: Use Node.js |
44 | 61 | uses: actions/setup-node@v6 |
45 | 62 | with: |
46 | | - cache: npm |
47 | | - - run: npm install --no-fund --no-audit --ignore-scripts |
48 | | - - name: Check types |
49 | | - run: npm run check |
| 63 | + node-version: 22 |
| 64 | + - run: npm ci --ignore-scripts --no-audit --no-fund |
| 65 | + - run: npm run lint |
50 | 66 |
|
51 | | - test: |
52 | | - name: Unit tests |
| 67 | + npm-audit: |
| 68 | + name: Audit packages |
53 | 69 | runs-on: ubuntu-latest |
54 | 70 | steps: |
55 | | - - uses: actions/checkout@v6 |
| 71 | + - name: Checkout code |
| 72 | + uses: actions/checkout@v6 |
56 | 73 | - name: Use Node.js |
57 | 74 | uses: actions/setup-node@v6 |
58 | 75 | with: |
59 | | - cache: npm |
60 | | - - run: npm install --no-fund --no-audit --ignore-scripts |
61 | | - - run: npm run build |
62 | | - - run: npm test |
| 76 | + node-version: 22 |
| 77 | + - run: npm audit --audit-level=high |
0 commit comments