From cb5c66a756b70ba7ace052d8ce4349919db2bd3f Mon Sep 17 00:00:00 2001 From: "Mr. Robot" Date: Mon, 2 Sep 2024 10:20:07 +0600 Subject: [PATCH] ci: add strategy for node version --- .github/workflows/ci.yml | 46 +++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dbdfda0..3a46e1e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,29 +3,31 @@ name: ci permissions: {} on: - push: - branches: - - develop - pull_request: - branches: - - develop - workflow_dispatch: {} - merge_group: {} + push: + branches: + - develop + pull_request: + branches: + - develop + workflow_dispatch: {} + merge_group: {} jobs: - ci: - runs-on: ubuntu-latest + ci: + runs-on: ubuntu-latest + strategy: + matrix: + node: [18, 20, 22] + steps: + - uses: actions/checkout@v4 + - run: corepack enable + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + cache: npm - steps: - - uses: actions/checkout@v4 - - run: corepack enable - - uses: actions/setup-node@v4 - with: - node_version: 20 - cache: npm + - name: 📦 Install dependencies + run: npm install - - name: 📦 Install dependencies - run: npm install - - - name: 📝 Lint - run: npm run lint + - name: 📝 Lint + run: npm run lint