From c1d1eea617bd7b873beb0bd7618072849fd95bff Mon Sep 17 00:00:00 2001 From: yuankong Date: Mon, 23 Dec 2024 16:35:20 +0800 Subject: [PATCH] fix: github workflows node not found --- .github/workflows/npm_test.yml | 69 +++++++++++++++++----------------- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/.github/workflows/npm_test.yml b/.github/workflows/npm_test.yml index 8e6575bb..81dfbb4c 100644 --- a/.github/workflows/npm_test.yml +++ b/.github/workflows/npm_test.yml @@ -1,34 +1,35 @@ -name: npm test - -on: - push: - branches: [ dev, master, test ] - pull_request: - branches: [ dev ] - -jobs: - test: - - runs-on: macos-latest - - strategy: - matrix: - node-version: [12.x] - - steps: - - uses: actions/checkout@v1 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: npm install, build - run: | - npm install - npm run build --if-present - env: - CI: true - - name: npm test - run: | - npm test - env: - CI: true +name: npm test + +on: + push: + branches: [ dev, master, test ] + pull_request: + branches: [ dev ] + +jobs: + test: + + runs-on: macos-latest + + strategy: + matrix: + node-version: [18.x] + + steps: + - uses: actions/checkout@v1 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + architecture: 'x64' + - name: npm install, build + run: | + npm install + npm run build --if-present + env: + CI: true + - name: npm test + run: | + npm test + env: + CI: true