Skip to content

Commit

Permalink
fix: move matrix to test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Oct 24, 2024
1 parent a5a7f9f commit b8709b6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 36 deletions.
21 changes: 0 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,37 +30,16 @@ jobs:
run: yarn lint
- run: yarn build
test_host:
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]
uses: ./.github/workflows/test.yml
with:
node_version: ${{ matrix.node-version }}
os: ${{ matrix.os }}
npm_command: test:host

test_18:
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]
uses: ./.github/workflows/test.yml
with:
node_version: ${{ matrix.node-version }}
os: ${{ matrix.os }}
npm_command: test:18

test_20:
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]
uses: ./.github/workflows/test.yml
with:
node_version: ${{ matrix.node-version }}
os: ${{ matrix.os }}
npm_command: test:20
23 changes: 8 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,28 @@ name: CI
on:
workflow_call:
inputs:
node_version:
description: 'Node.js version'
type: string
required: true
default: '18.x'
os:
description: 'Operating system'
type: string
required: true
default: 'ubuntu-latest'
npm_command:
description: 'NPM command to run'
type: string
required: true
default: 'install'


jobs:
test:
runs-on: ${{ inputs.os }}
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@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node_version }}
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v3
with:
path: ~/.pkg-cache/
key: ${{ inputs.os }}-${{ inputs.node_version }}
key: ${{ matrix.os }}-${{ matrix.node-version }}

- run: yarn install

Expand Down

0 comments on commit b8709b6

Please sign in to comment.