|
9 | 9 | pull_request: |
10 | 10 | branches: [main] |
11 | 11 |
|
| 12 | +# Ensure that only one instance of the workflow is run at a time for each branch/tag. |
| 13 | +# Jobs currently running on the branch/tag will be cancelled when new commits are pushed. |
| 14 | +# See https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#concurrency. |
| 15 | +concurrency: |
| 16 | + # `github.workflow` is the workflow name, `github.ref` is the current branch/tag identifier |
| 17 | + group: ${{ format('{0}:{1}', github.workflow, github.ref) }} |
| 18 | + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} |
| 19 | + |
12 | 20 | jobs: |
13 | | - build-and-test: |
| 21 | + build: |
14 | 22 | runs-on: ${{ matrix.os }} |
| 23 | + continue-on-error: true |
15 | 24 |
|
16 | 25 | strategy: |
17 | 26 | matrix: |
18 | | - os: [ubuntu-latest, windows-2019, macos-latest] |
| 27 | + os: [ubuntu-latest, windows-latest, macos-latest] |
19 | 28 | # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ |
20 | | - node-version: [14.x, 16.x, 18.x] |
| 29 | + node-version: [18.x, 20.x, 21.x] |
21 | 30 |
|
22 | 31 | steps: |
23 | | - - uses: actions/checkout@v3 |
| 32 | + - name: Checkout Code |
| 33 | + uses: actions/checkout@v3 |
24 | 34 |
|
25 | | - - name: Use Node.js ${{ matrix.node-version }} |
26 | | - uses: actions/setup-node@v3 |
| 35 | + - name: Install Node.js ${{ matrix.node-version }} |
| 36 | + uses: actions/setup-node@v4 |
27 | 37 | with: |
28 | 38 | node-version: ${{ matrix.node-version }} |
29 | 39 | cache: 'yarn' |
30 | 40 |
|
31 | | - - run: yarn install |
32 | | - - run: yarn test |
| 41 | + - name: Install node-gyp |
| 42 | + run: npm install -g node-gyp@10.0.1 |
| 43 | + |
| 44 | + - name: Install dependencies |
| 45 | + run: yarn |
| 46 | + |
| 47 | + - name: Build |
| 48 | + run: yarn build |
| 49 | + |
| 50 | + - name: Run tests |
| 51 | + run: yarn test |
0 commit comments