|
8 | 8 | types: [opened, synchronize]
|
9 | 9 |
|
10 | 10 | jobs:
|
11 |
| - v18: |
12 |
| - runs-on: ubuntu-22.04 |
13 |
| - container: |
14 |
| - image: 'ubuntu:22.04' |
| 11 | + build: |
| 12 | + strategy: |
| 13 | + matrix: |
| 14 | + os: [ubuntu-22.04, windows-2022] |
| 15 | + node: [18, 20] |
| 16 | + runs-on: ${{ matrix.os }} |
15 | 17 | steps:
|
16 |
| - - name: Install required dependencies |
17 |
| - run: | |
18 |
| - apt update |
19 |
| - apt install --yes sudo |
20 |
| - sudo apt install --yes git |
21 |
| - sudo apt install --yes curl |
22 |
| - curl --location https://deb.nodesource.com/setup_18.x | sudo --preserve-env bash - |
23 |
| - sudo DEBIAN_FRONTEND=noninteractive apt install --yes nodejs |
24 | 18 | - uses: actions/checkout@v4
|
25 |
| - # workaround for https://github.com/actions/runner/issues/2033 |
26 |
| - - name: ownership workaround |
27 |
| - run: git config --global --add safe.directory '*' |
28 |
| - - name: Install yarn |
29 |
| - run: | |
30 |
| - npm install --global yarn |
31 |
| - node --version |
32 |
| - yarn global add yarn@latest |
33 |
| - - name: Install dependencies |
34 |
| - run: yarn install --ignore-engines --frozen-lockfile |
35 |
| - - name: Build packages |
36 |
| - run: yarn build |
37 |
| - - name: Test |
38 |
| - run: yarn test-ci |
39 |
| - |
40 |
| - v20: |
41 |
| - runs-on: ubuntu-22.04 |
42 |
| - container: |
43 |
| - image: 'ubuntu:22.04' |
44 |
| - steps: |
45 |
| - - name: Install required dependencies |
46 |
| - run: | |
47 |
| - apt update |
48 |
| - apt install --yes sudo |
49 |
| - sudo apt install --yes git |
50 |
| - sudo apt install --yes curl |
51 |
| - curl --location https://deb.nodesource.com/setup_20.x | sudo --preserve-env bash - |
52 |
| - sudo DEBIAN_FRONTEND=noninteractive apt install --yes nodejs |
53 |
| - - uses: actions/checkout@v4 |
54 |
| - # workaround for https://github.com/actions/runner/issues/2033 |
55 |
| - - name: ownership workaround |
56 |
| - run: git config --global --add safe.directory '*' |
57 |
| - - name: Install yarn |
58 |
| - run: | |
59 |
| - npm install --global yarn |
60 |
| - node --version |
61 |
| - yarn global add yarn@latest |
62 |
| - - name: Install dependencies |
63 |
| - run: yarn install --ignore-engines --frozen-lockfile |
64 |
| - - name: Build packages |
65 |
| - run: yarn build |
66 |
| - - name: Test |
67 |
| - run: yarn test-ci |
68 | 19 |
|
69 |
| - windows: |
70 |
| - runs-on: windows-2022 |
71 |
| - steps: |
72 |
| - - uses: actions/checkout@v4 |
| 20 | + - uses: actions/setup-node@v3 |
73 | 21 | with:
|
74 |
| - max_attempts: 3 |
75 |
| - - name: Update yarn |
76 |
| - run: | |
77 |
| - node --version |
78 |
| - yarn global add yarn@latest |
| 22 | + node-version: ${{ matrix.node }} |
| 23 | + cache: yarn |
| 24 | + |
79 | 25 | - name: Install dependencies
|
80 | 26 | run: yarn install --ignore-engines --frozen-lockfile
|
| 27 | + |
81 | 28 | - name: Build packages
|
82 | 29 | run: yarn build
|
| 30 | + |
83 | 31 | - name: Test
|
84 | 32 | run: yarn test-ci
|
0 commit comments