|
1 | 1 | name: CI
|
2 | 2 |
|
| 3 | +env: |
| 4 | + # configure corepack |
| 5 | + COREPACK_DEFAULT_TO_LATEST: 0 |
| 6 | + COREPACK_ENABLE_AUTO_PIN: 0 |
| 7 | + # configure yarn |
| 8 | + YARN_ENABLE_IMMUTABLE_INSTALLS: 'false' |
| 9 | + |
3 | 10 | on:
|
4 | 11 | push:
|
5 | 12 | branches:
|
|
15 | 22 | jobs:
|
16 | 23 | test:
|
17 | 24 | name: Test
|
18 |
| - timeout-minutes: 10 |
| 25 | + timeout-minutes: 5 |
19 | 26 | runs-on: ${{ matrix.os }}
|
20 | 27 | strategy:
|
21 | 28 | fail-fast: false
|
22 | 29 | matrix:
|
23 |
| - node: [16] |
| 30 | + node: [20] |
24 | 31 | os: [ubuntu-latest, macos-latest, windows-latest]
|
| 32 | + pm: ["pnpm@9"] |
25 | 33 | include:
|
26 |
| - - node: 18 |
| 34 | + - node: 22 |
| 35 | + os: ubuntu-latest |
| 36 | + pm: "pnpm@9" |
| 37 | + - node: 22 |
| 38 | + os: ubuntu-latest |
| 39 | + pm: "yarn@4" |
| 40 | + - node: 22 |
27 | 41 | os: ubuntu-latest
|
| 42 | + pm: "npm@10" |
28 | 43 | steps:
|
29 |
| - - name: Checkout |
30 |
| - uses: actions/checkout@v3 |
31 |
| - |
32 |
| - - name: Install pnpm |
33 |
| - uses: pnpm/action-setup@v2.2.4 |
34 |
| - with: |
35 |
| - version: '7.14.1' |
36 |
| - |
37 |
| - - name: Setup node |
38 |
| - uses: actions/setup-node@v3 |
| 44 | + - uses: actions/checkout@v4 |
| 45 | + - uses: actions/setup-node@v4 |
39 | 46 | with:
|
40 | 47 | node-version: ${{ matrix.node }}
|
41 |
| - cache: pnpm |
42 |
| - cache-dependency-path: '**/pnpm-lock.yaml' |
43 |
| - |
44 |
| - - name: Install dependencies |
45 |
| - run: pnpm install --frozen-lockfile --prefer-offline |
46 |
| - |
47 |
| - - name: Test |
48 |
| - run: pnpm test |
49 |
| - |
50 |
| - test-npm: |
51 |
| - name: Test npm |
52 |
| - timeout-minutes: 5 |
53 |
| - runs-on: ubuntu-latest |
54 |
| - steps: |
55 |
| - - name: Checkout |
56 |
| - uses: actions/checkout@v3 |
57 |
| - |
58 |
| - - name: Setup workspaces |
59 |
| - run: cat package.json | jq '.workspaces = ["tests/deps/*","tests/projects/*"]' | tee package.json |
60 |
| - |
61 |
| - - name: Setup node |
62 |
| - uses: actions/setup-node@v3 |
63 |
| - with: |
64 |
| - node-version: 16 |
65 |
| - |
66 |
| - - name: Install dependencies |
67 |
| - run: npm install |
68 |
| - |
69 |
| - - name: Test |
70 |
| - run: npm test |
71 |
| - |
72 |
| - test-yarn: |
73 |
| - name: Test yarn PnP |
74 |
| - timeout-minutes: 5 |
75 |
| - runs-on: ubuntu-latest |
76 |
| - steps: |
77 |
| - - name: Checkout |
78 |
| - uses: actions/checkout@v3 |
79 |
| - |
80 |
| - - name: Setup workspaces |
81 |
| - run: cat package.json | jq '.workspaces = ["tests/deps/*","tests/projects/*"]' | tee package.json |
82 |
| - |
83 |
| - - name: Use yarn 3 |
84 |
| - run: cat package.json | jq '.packageManager = "yarn@3.2.4"' | tee package.json |
85 |
| - |
86 |
| - - name: Setup node |
87 |
| - uses: actions/setup-node@v3 |
88 |
| - with: |
89 |
| - node-version: 16 |
90 |
| - |
91 |
| - - name: Enable corepack |
92 |
| - run: corepack enable |
93 |
| - |
| 48 | + - run: corepack enable |
94 | 49 | - name: Install dependencies
|
95 |
| - run: yarn |
96 |
| - env: |
97 |
| - YARN_ENABLE_IMMUTABLE_INSTALLS: false |
| 50 | + run: corepack ${{matrix.pm}} install |
98 | 51 |
|
99 | 52 | - name: Test
|
100 |
| - run: yarn test |
| 53 | + run: corepack ${{matrix.pm}} test |
0 commit comments