From e4374aceae84e7ffd75179594867ab2da80bced4 Mon Sep 17 00:00:00 2001 From: Manuel <5673677+mtrezza@users.noreply.github.com> Date: Sat, 21 Oct 2023 02:49:00 +0200 Subject: [PATCH] ci: Add Node versions to test (#224) --- .github/workflows/ci.yml | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf0e89e..a332140 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,27 +1,41 @@ name: ci on: push: - branches: [ master, release, alpha, beta ] + branches: + - master pull_request: - branches: [ '**' ] + branches: + - '**' jobs: test: + strategy: + matrix: + include: + - name: Node.js 14 + NODE_VERSION: 14 + - name: Node.js 16 + NODE_VERSION: 16 + - name: Node.js 18 + NODE_VERSION: 18 + - name: Node.js 20 + NODE_VERSION: 20 + fail-fast: false + name: ${{ matrix.name }} + timeout-minutes: 15 runs-on: ubuntu-latest - timeout-minutes: 30 steps: - - name: Checkout repository - uses: actions/checkout@v2 - - name: Setup Node - uses: actions/setup-node@v2 + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.NODE_VERSION }} + uses: actions/setup-node@v1 with: - node-version: 14 + node-version: ${{ matrix.NODE_VERSION }} - name: Cache Node.js modules uses: actions/cache@v2 with: path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }} restore-keys: | - ${{ runner.os }}-node- + ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}- - name: Install dependencies run: npm ci - name: Build package