mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
ci: Add matrix strategy
This commit is contained in:
parent
78389a8642
commit
5297c9fa44
24
.github/workflows/ci-master.yml
vendored
24
.github/workflows/ci-master.yml
vendored
|
@ -41,12 +41,15 @@ jobs:
|
||||||
/github/home/.pnpm-store
|
/github/home/.pnpm-store
|
||||||
./node_modules
|
./node_modules
|
||||||
./packages
|
./packages
|
||||||
key: ${{ github.sha }}-base:18-test-lint
|
key: ${{ github.sha }}-base:${{ matrix.node-version }}-test-lint
|
||||||
|
|
||||||
unit-test:
|
unit-test:
|
||||||
name: Unit tests
|
name: Unit tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: install-and-build
|
needs: install-and-build
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-version: [18.x, 20.x]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
|
@ -61,15 +64,15 @@ jobs:
|
||||||
/github/home/.pnpm-store
|
/github/home/.pnpm-store
|
||||||
./node_modules
|
./node_modules
|
||||||
./packages
|
./packages
|
||||||
key: ${{ github.sha }}-base:18-test-lint
|
key: ${{ github.sha }}-base:${{ matrix.node-version }}-test-lint
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v2.2.4
|
- uses: pnpm/action-setup@v2.2.4
|
||||||
|
|
||||||
- name: Use Node.js 18
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 18.x
|
node-version: ${{ matrix.node-version }}
|
||||||
cache: pnpm
|
cache: 'pnpm'
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: pnpm test
|
run: pnpm test
|
||||||
|
@ -97,15 +100,15 @@ jobs:
|
||||||
/github/home/.pnpm-store
|
/github/home/.pnpm-store
|
||||||
./node_modules
|
./node_modules
|
||||||
./packages
|
./packages
|
||||||
key: ${{ github.sha }}-base:18-test-lint
|
key: ${{ github.sha }}-base:${{ matrix.node-version }}-test-lint
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v2.2.4
|
- uses: pnpm/action-setup@v2.2.4
|
||||||
|
|
||||||
- name: Use Node.js 18
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 18.x
|
node-version: ${{ matrix.node-version }}
|
||||||
cache: pnpm
|
cache: 'pnpm'
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
env:
|
env:
|
||||||
|
@ -116,6 +119,9 @@ jobs:
|
||||||
name: Notify Slack on failure
|
name: Notify Slack on failure
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [unit-test, lint]
|
needs: [unit-test, lint]
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-version: [18.x, 20.x]
|
||||||
steps:
|
steps:
|
||||||
- name: Notify Slack on failure
|
- name: Notify Slack on failure
|
||||||
uses: act10ns/slack@v2.0.0
|
uses: act10ns/slack@v2.0.0
|
||||||
|
|
Loading…
Reference in a new issue