From b8709b6335b20f8460f4a05e296003e77a366c0c Mon Sep 17 00:00:00 2001 From: Daniel Lando Date: Thu, 24 Oct 2024 12:05:00 +0200 Subject: [PATCH] fix: move matrix to `test.yml` --- .github/workflows/ci.yml | 21 --------------------- .github/workflows/test.yml | 23 ++++++++--------------- 2 files changed, 8 insertions(+), 36 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d47b8b9d..29ab53c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 246a3477..7dc85cb8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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