|
| 1 | +concurrency: |
| 2 | + cancel-in-progress: true |
| 3 | + group: ${{ github.workflow }}-${{ github.ref }} |
1 | 4 | jobs: |
2 | | - cancel-existing: |
3 | | - if: "!contains(github.event.head_commit.message, '[skip ci]')" |
4 | | - runs-on: ubuntu-latest |
5 | | - steps: |
6 | | - - env: |
7 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
8 | | - uses: rokroskar/workflow-run-cleanup-action@v0.3.3 |
9 | 5 | release: |
10 | 6 | needs: test |
11 | 7 | runs-on: ubuntu-latest |
12 | 8 | steps: |
13 | | - - uses: actions/checkout@v3 |
| 9 | + - uses: actions/checkout@v4 |
14 | 10 | with: |
15 | 11 | lfs: true |
16 | 12 | ref: ${{ github.event.pull_request.head.repo.full_name == github.repository && |
17 | 13 | github.event.pull_request.head.ref || '' }} |
18 | | - - uses: actions/setup-node@v3 |
| 14 | + - uses: actions/setup-node@v4 |
19 | 15 | with: |
20 | | - node-version: 16 |
| 16 | + node-version: 22 |
| 17 | + - run: corepack enable |
21 | 18 | - run: git config --global user.email "actions@github.com" |
22 | 19 | - run: git config --global user.name "GitHub Actions" |
23 | | - - run: yarn --frozen-lockfile |
24 | | - - run: yarn checkUnknownFiles |
25 | | - - run: yarn lint |
| 20 | + - run: pnpm install --frozen-lockfile |
| 21 | + - run: pnpm lint |
26 | 22 | - env: |
27 | 23 | GITHUB_REPOSITORY: ${{ secrets.GITHUB_REPOSITORY }} |
28 | 24 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
29 | 25 | name: Push changed files |
30 | | - run: yarn dw-ci push-changed-files |
| 26 | + run: pnpm dw-ci push-changed-files |
31 | 27 | - env: |
32 | 28 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
33 | | - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
34 | 29 | if: github.ref == 'refs/heads/master' |
35 | 30 | name: Release |
36 | | - run: yarn semantic-release |
| 31 | + run: pnpm semantic-release |
37 | 32 | test: |
38 | | - needs: cancel-existing |
39 | 33 | runs-on: ${{ matrix.os }} |
40 | 34 | steps: |
41 | | - - uses: actions/checkout@v3 |
| 35 | + - uses: actions/checkout@v4 |
42 | 36 | with: |
43 | | - fetch-depth: 0 |
44 | 37 | lfs: true |
45 | | - - uses: actions/setup-node@v3 |
| 38 | + - uses: actions/setup-node@v4 |
46 | 39 | with: |
| 40 | + check-latest: true |
47 | 41 | node-version: ${{ matrix.node }} |
48 | | - - run: yarn --frozen-lockfile |
| 42 | + - run: corepack enable |
| 43 | + - run: pnpm install --frozen-lockfile |
49 | 44 | - env: |
50 | 45 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
51 | | - run: yarn test |
52 | | - - if: failure() |
53 | | - uses: actions/upload-artifact@v3 |
| 46 | + run: pnpm verify |
| 47 | + - if: always() |
| 48 | + uses: actions/upload-artifact@v4 |
54 | 49 | with: |
55 | | - name: Image Snapshot Diffs |
56 | | - path: "**/__image_snapshots__/__diff_output__" |
57 | | - - if: matrix.os == 'ubuntu-latest' && matrix.node == 16 |
58 | | - uses: codecov/codecov-action@v3 |
| 50 | + if-no-files-found: ignore |
| 51 | + name: Data from tests |
| 52 | + path: test-results/*/** |
| 53 | + - if: matrix.os == 'ubuntu-latest' && matrix.node == 22 |
| 54 | + uses: codecov/codecov-action@v5 |
59 | 55 | with: |
60 | 56 | token: ${{ secrets.CODECOV_TOKEN }} |
61 | 57 | strategy: |
62 | 58 | matrix: |
63 | 59 | include: |
64 | | - - node: 14 |
65 | | - os: ubuntu-latest |
66 | | - - node: 16 |
| 60 | + - node: 22 |
67 | 61 | os: ubuntu-latest |
68 | | - - node: 18 |
| 62 | + - node: 24 |
69 | 63 | os: ubuntu-latest |
70 | | - - node: 16 |
| 64 | + - node: 22 |
71 | 65 | os: macos-latest |
72 | | - - node: 16 |
| 66 | + - node: 22 |
73 | 67 | os: windows-latest |
74 | 68 | name: build |
75 | 69 | on: |
76 | 70 | pull_request: {} |
77 | 71 | push: |
78 | 72 | branches: |
79 | 73 | - master |
| 74 | +permissions: |
| 75 | + contents: write |
| 76 | + id-token: write |
| 77 | + issues: write |
| 78 | + pull-requests: write |
0 commit comments