|
7 | 7 | pull_request: {}
|
8 | 8 |
|
9 | 9 | jobs:
|
10 |
| - test: |
| 10 | + test-and-release: |
11 | 11 | runs-on: ubuntu-latest
|
12 |
| - if: "!contains(github.event.head_commit.message, '[skip ci]')" |
| 12 | + if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }} |
13 | 13 |
|
14 | 14 | strategy:
|
15 | 15 | matrix:
|
16 |
| - node-version: [18.x, 20.x] |
| 16 | + node-version: [20.x, 22.x, 24.x] |
| 17 | + |
| 18 | + concurrency: |
| 19 | + group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.node-version }} |
| 20 | + cancel-in-progress: true |
17 | 21 |
|
18 | 22 | steps:
|
19 |
| - - name: 🛑 Cancel Previous Runs |
20 |
| - uses: styfle/cancel-workflow-action@a40b8845c0683271d9f53dfcb887a7e181d3918b # [email protected] |
21 |
| - - name: ⬇️ Checkout repo |
22 |
| - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # pin@v2 |
23 |
| - - name: ⎔ Setup node ${{ matrix.node-version }} |
24 |
| - uses: actions/setup-node@25316bbc1f10ac9d8798711f44914b1cf3c4e954 # pin@v2 |
| 23 | + - name: 📥 Checkout repository |
| 24 | + uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 # pin@main |
| 25 | + |
| 26 | + - name: 🟢 Setup Node.js |
| 27 | + uses: actions/setup-node@802632921f8532d2409ae6eac3313b6f81f11122 # pin@main |
25 | 28 | with:
|
26 | 29 | node-version: ${{ matrix.node-version }}
|
27 | 30 | cache: "npm"
|
| 31 | + |
28 | 32 | - name: 🗄 Cache node_modules
|
29 | 33 | id: cache-node_modules
|
30 |
| - uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # pin@v2 |
| 34 | + uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # pin@main |
31 | 35 | with:
|
32 | 36 | path: "**/node_modules"
|
33 | 37 | key: node_modules-${{ runner.os }}-node-${{ matrix.node-version }}-${{
|
34 | 38 | hashFiles('**/package-lock.json') }}
|
35 |
| - - name: 📥 Install dependencies |
| 39 | + |
| 40 | + - name: 🔍 Install dependencies |
36 | 41 | if: steps.cache-node_modules.outputs.cache-hit != 'true'
|
37 | 42 | run: |
|
38 |
| - npm ci --ignore-scripts |
39 |
| - - name: 🧪 Test |
| 43 | + npm ci --ignore-scripts --prefer-offline --no-audit |
| 44 | +
|
| 45 | + - name: 🧪 Run tests |
40 | 46 | run: |
|
41 | 47 | npm test
|
42 | 48 | env:
|
43 | 49 | CI: true
|
44 |
| - - name: ⬆️ Upload coverage report |
45 |
| - uses: coverallsapp/github-action@9ba913c152ae4be1327bfb9085dc806cedb44057 # [email protected] |
46 |
| - with: |
47 |
| - github-token: ${{ secrets.GITHUB_TOKEN }} |
|
0 commit comments