Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ci: split compat-test job: move compat-test prep to prep
  • Loading branch information
legobeat committed Dec 4, 2023
commit 446ea8f2c641b2b61e7fd7a49ef4b3862fa9cf02
21 changes: 17 additions & 4 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
name: Prepare
runs-on: ubuntu-latest
outputs:
PACKAGE_NAME: ${{ steps.local-publish.outputs.package-name }}
PACKAGE_SHASUM: ${{ steps.local-publish.outputs.package-shasum }}
YARN_CACHE_DIR: ${{ steps.yarn-cache-dir.outputs.YARN_CACHE_DIR }}
YARN_VERSION: ${{ steps.yarn-version.outputs.YARN_VERSION }}
strategy:
Expand All @@ -34,6 +36,13 @@ jobs:
key: yarn-cache-${{ runner.os }}-${{ steps.yarn-version.outputs.YARN_VERSION }}-${{ hashFiles('yarn.lock') }}-${{ matrix.node-version }}
- name: Install Yarn dependencies
run: yarn --immutable
- uses: legobeat/npm-actions/publish@dev-multi
id: local-publish
- name: Cache package registry
uses: actions/cache@v3
with:
path: /home/runner/work/_temp/_github_home/registry-data
key: yarn-cache-${{ steps.local-publish.outputs.package-name }}-${{ steps.local-publish.outputs.package-shasum }}
build:
name: Build
runs-on: ubuntu-latest
Expand Down Expand Up @@ -67,16 +76,20 @@ jobs:
runs-on: ubuntu-latest
needs:
- prepare
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- uses: actions/checkout@v3
- uses: legobeat/npm-actions/publish@dev-multi
id: local-publish
- name: Cache package registry
- name: Resture package registry cache
uses: actions/cache@v3
with:
path: /home/runner/work/_temp/_github_home/registry-data
key: yarn-cache-${{ steps.local-publish.outputs.package-name }}-${{ steps.local-publish.outputs.package-shasum }}
key: yarn-cache-${{ needs.prepare.outputs.PACKAGE_NAME }}-${{ needs.prepare.outputs.PACKAGE_SHASUM }}
- uses: legobeat/npm-actions/compat-test@dev-multi
name: 'Install package as dependency using Node.js ${{ matrix.node-version }}'
with:
node-version: ${{ matrix.node-version }}
- name: Require clean working directory
shell: bash
run: |
Expand Down