From 08730b2a9338c5d5251902be89cf9870d86767b3 Mon Sep 17 00:00:00 2001 From: fi3ework Date: Sat, 27 Apr 2024 02:35:51 +0800 Subject: [PATCH] ci: use x64 arch node 10.x for macos-latest --- .github/workflows/test.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3ace790707e..fb7b3510c17 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -139,10 +139,21 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 + - uses: actions/github-script@v7 + id: calculate_architecture + with: + result-encoding: string + script: | + if ('${{ matrix.os }}' === 'macos-latest' && '${{ matrix['node-version'] }}' === '10.x') { + return "x64" + } else { + return '' + } - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} + architecture: ${{ steps.calculate_architecture.outputs.result }} cache: "yarn" # Install old `jest` version and deps for legacy node versions - run: |