forked from vercel/pkg
-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: allow to run tests in parallel (#115)
- Loading branch information
1 parent
417cf78
commit f564a33
Showing
4 changed files
with
61 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: CI | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
npm_command: | ||
description: 'NPM command to run' | ||
type: string | ||
required: true | ||
default: 'install' | ||
jobs: | ||
test: | ||
strategy: | ||
fail-fast: false # prevent test to stop if one fails | ||
matrix: | ||
node-version: [18.x, 20.x] | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'yarn' | ||
- uses: actions/cache@v4 | ||
with: | ||
path: ~/.pkg-cache/ | ||
key: ${{ matrix.os }}-${{ matrix.node-version }} | ||
|
||
- run: yarn install | ||
|
||
- run: yarn build | ||
- run: yarn ${{ inputs.npm_command }} | ||
env: | ||
CI: true | ||
timeout-minutes: 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters