From 7cff70f4336b8e1b7a572f30b93e503cb45cfef7 Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Mon, 2 Dec 2024 23:02:07 +0100 Subject: [PATCH] :construction_worker: Test against multiple node versions Test against 20 and 22 --- .github/workflows/cli-tests.yml | 5 ++++- .github/workflows/documentation.yml | 3 ++- .github/workflows/publish.yml | 3 ++- .github/workflows/tests.yml | 8 ++++++-- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cli-tests.yml b/.github/workflows/cli-tests.yml index 7a6648e..c182535 100644 --- a/.github/workflows/cli-tests.yml +++ b/.github/workflows/cli-tests.yml @@ -8,10 +8,13 @@ jobs: tests: runs-on: ubuntu-latest timeout-minutes: 5 + strategy: + matrix: + node-version: [20.x, 22.x] steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: "20.x" + node-version: ${{ matrix.node-version }} - run: yarn install --no-ignore-optional - run: yarn cli --help diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index fdc62d9..17dde7b 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -8,11 +8,12 @@ on: jobs: deploy: runs-on: ubuntu-latest + timeout-minutes: 5 steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: "20.x" + node-version: "22.x" - name: git config run: | git config user.name documentation-deploy-action diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1dc72df..e856eeb 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -8,11 +8,12 @@ on: jobs: build: runs-on: ubuntu-latest + timeout-minutes: 5 steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: "20.x" + node-version: "22.x" registry-url: "https://registry.npmjs.org" - run: yarn install - run: yarn build diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bccb5f2..15c8221 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,13 +5,17 @@ on: pull_request: jobs: - build: + tests: runs-on: ubuntu-latest + timeout-minutes: 5 + strategy: + matrix: + node-version: [20.x, 22.x] steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: "20.x" + node-version: ${{ matrix.node-version }} - run: yarn install - run: yarn lint - run: yarn build