Skip to content

Commit 446ea8f

Browse files
committed
ci: split compat-test job: move compat-test prep to prep
1 parent 1496f73 commit 446ea8f

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

.github/workflows/build-test.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ jobs:
1010
name: Prepare
1111
runs-on: ubuntu-latest
1212
outputs:
13+
PACKAGE_NAME: ${{ steps.local-publish.outputs.package-name }}
14+
PACKAGE_SHASUM: ${{ steps.local-publish.outputs.package-shasum }}
1315
YARN_CACHE_DIR: ${{ steps.yarn-cache-dir.outputs.YARN_CACHE_DIR }}
1416
YARN_VERSION: ${{ steps.yarn-version.outputs.YARN_VERSION }}
1517
strategy:
@@ -34,6 +36,13 @@ jobs:
3436
key: yarn-cache-${{ runner.os }}-${{ steps.yarn-version.outputs.YARN_VERSION }}-${{ hashFiles('yarn.lock') }}-${{ matrix.node-version }}
3537
- name: Install Yarn dependencies
3638
run: yarn --immutable
39+
- uses: legobeat/npm-actions/publish@dev-multi
40+
id: local-publish
41+
- name: Cache package registry
42+
uses: actions/cache@v3
43+
with:
44+
path: /home/runner/work/_temp/_github_home/registry-data
45+
key: yarn-cache-${{ steps.local-publish.outputs.package-name }}-${{ steps.local-publish.outputs.package-shasum }}
3746
build:
3847
name: Build
3948
runs-on: ubuntu-latest
@@ -67,16 +76,20 @@ jobs:
6776
runs-on: ubuntu-latest
6877
needs:
6978
- prepare
79+
strategy:
80+
matrix:
81+
node-version: [18.x, 20.x]
7082
steps:
7183
- uses: actions/checkout@v3
72-
- uses: legobeat/npm-actions/publish@dev-multi
73-
id: local-publish
74-
- name: Cache package registry
84+
- name: Resture package registry cache
7585
uses: actions/cache@v3
7686
with:
7787
path: /home/runner/work/_temp/_github_home/registry-data
78-
key: yarn-cache-${{ steps.local-publish.outputs.package-name }}-${{ steps.local-publish.outputs.package-shasum }}
88+
key: yarn-cache-${{ needs.prepare.outputs.PACKAGE_NAME }}-${{ needs.prepare.outputs.PACKAGE_SHASUM }}
7989
- uses: legobeat/npm-actions/compat-test@dev-multi
90+
name: 'Install package as dependency using Node.js ${{ matrix.node-version }}'
91+
with:
92+
node-version: ${{ matrix.node-version }}
8093
- name: Require clean working directory
8194
shell: bash
8295
run: |

0 commit comments

Comments
 (0)