|
| 1 | +on: |
| 2 | + push: |
| 3 | + branches: |
| 4 | + - main |
| 5 | + - next |
| 6 | + - 'v*' |
| 7 | + pull_request: |
| 8 | + paths-ignore: |
| 9 | + - LICENSE |
| 10 | + - '*.md' |
| 11 | + |
1 | 12 | name: CI
|
2 |
| -on: [push, pull_request] |
3 | 13 |
|
4 | 14 | jobs:
|
5 |
| - build: |
| 15 | + lint: |
| 16 | + permissions: |
| 17 | + contents: read |
| 18 | + name: Lint |
6 | 19 | runs-on: ubuntu-latest
|
| 20 | + steps: |
| 21 | + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 22 | + - name: Install Node.js |
| 23 | + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 |
| 24 | + with: |
| 25 | + node-version: v22.x |
| 26 | + cache: 'npm' |
| 27 | + cache-dependency-path: package.json |
| 28 | + |
| 29 | + - name: Install dependencies |
| 30 | + run: npm install |
| 31 | + - name: Check linting |
| 32 | + run: npm run lint:ci |
| 33 | + |
| 34 | + tests: |
| 35 | + permissions: |
| 36 | + contents: read |
| 37 | + name: Tests |
7 | 38 | strategy:
|
| 39 | + fail-fast: false |
8 | 40 | matrix:
|
9 |
| - node: [18.x, 20.x, 21.x] |
10 |
| - name: Node ${{ matrix.node }} |
| 41 | + os: [ubuntu-latest, macos-latest, windows-latest] |
| 42 | + node-version: [20.x, 22.x, 24.x] |
| 43 | + runs-on: ${{matrix.os}} |
| 44 | + steps: |
| 45 | + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 46 | + with: |
| 47 | + persist-credentials: false |
| 48 | + |
| 49 | + - name: Use Node.js ${{ matrix.node-version }} |
| 50 | + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 |
| 51 | + with: |
| 52 | + node-version: ${{ matrix.node-version }} |
| 53 | + cache: 'npm' |
| 54 | + cache-dependency-path: package.json |
| 55 | + |
| 56 | + - name: Install Dependencies |
| 57 | + run: npm install |
| 58 | + |
| 59 | + - name: Run Tests |
| 60 | + run: npm run test:ci |
| 61 | + |
| 62 | + automerge: |
| 63 | + if: > |
| 64 | + github.event_name == 'pull_request' && github.event.pull_request.user.login == 'dependabot[bot]' |
| 65 | + needs: |
| 66 | + - tests |
| 67 | + runs-on: ubuntu-latest |
| 68 | + permissions: |
| 69 | + contents: write |
| 70 | + pull-requests: write |
11 | 71 | steps:
|
12 |
| - - uses: actions/checkout@v4 |
13 |
| - - name: Setup node |
14 |
| - uses: actions/setup-node@v4 |
| 72 | + - name: Merge Dependabot PR |
| 73 | + uses: fastify/github-action-merge-dependabot@e820d631adb1d8ab16c3b93e5afe713450884a4a # v3.11.1 |
15 | 74 | with:
|
16 |
| - node-version: ${{ matrix.node }} |
17 |
| - - run: npm install |
18 |
| - - run: npm run test:ci |
| 75 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments