From 2617fd0823a89b552b9ce6d72930c2ec4e42e21f Mon Sep 17 00:00:00 2001 From: wewoor Date: Fri, 12 May 2023 11:05:21 +0800 Subject: [PATCH] ci: support mutiple node versions --- .github/workflows/nodejs.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 06fa76c..6fb5787 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -1,4 +1,4 @@ -name: Node CI +name: CI # Triggers the workflow on push or pull request events but only for the master branch on: @@ -17,6 +17,11 @@ jobs: steps: - name: checkout uses: actions/checkout@v2 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} - name: cache yarn.lock uses: actions/cache@v2 @@ -49,7 +54,12 @@ jobs: needs: [setup] steps: - uses: actions/checkout@v2 - + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - name: Restore cache from yarn.lock uses: actions/cache@v2 with: @@ -72,6 +82,11 @@ jobs: needs: [setup] steps: - uses: actions/checkout@v2 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} - name: Restore cache from yarn.lock uses: actions/cache@v2