From ffd1161a47ae38e4d95a3c4eb92faed42747075c Mon Sep 17 00:00:00 2001 From: Igor Starovierov Date: Mon, 28 Oct 2024 08:52:13 +0000 Subject: [PATCH] add ci matrix --- .github/workflows/ci.yml | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6e4e9b4..fd1f7fe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,25 +1,48 @@ -name: lint and test +name: CI on: push: pull_request: jobs: - ci: + lint: runs-on: ubuntu-latest strategy: matrix: - node-version: [18.x] + node: [22] steps: - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js ${{ matrix.node }} uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node-version }} + node-version: ${{ matrix.node }} cache: "npm" - name: Install dependencies run: npm ci - name: Linters run: npm run lint + + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node: [16, 18, 20, 22] + node-red: [2, 3, 4] + exclude: + - node: 16 + node-red: 4 + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node }} + cache: "npm" + - name: Install dependencies + run: npm ci + - name: Install node-red + run: npm install -g --unsafe-perm node-red@${{ matrix.node-red }}