From 71c652d8e573de08b0367f611dcd92dd1626ec74 Mon Sep 17 00:00:00 2001 From: cm-ayf Date: Thu, 23 May 2024 07:21:16 +0900 Subject: [PATCH 1/2] share .node between tests --- .github/workflows/test.yml | 40 ++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3ae009a..616fe57 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,14 +1,17 @@ +name: Test +env: + APP_NAME: om-syrinx + on: pull_request: branches: [main] jobs: - test: + build: strategy: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] - node: [18, 20, 22] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -16,7 +19,7 @@ jobs: - name: Setup node uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node }} + node-version: 20 check-latest: true cache: pnpm - name: Install @@ -32,12 +35,41 @@ jobs: ~/.cargo/git/db/ .cargo-cache target/ - key: cargo-${{ matrix.os }}-${{ matrix.node }} + key: cargo-${{ matrix.os }} - name: Install dependencies run: pnpm install - name: Build run: pnpm build shell: bash + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: test-build-${{ matrix.os }} + path: ${{ env.APP_NAME }}.*.node + if-no-files-found: error + test: + needs: build + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + node: [18, 20, 22] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v3 + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + check-latest: true + cache: pnpm + - name: Install dependencies + run: pnpm install + - name: Download All Artifacts + uses: actions/download-artifact@v4 + with: + name: test-build-${{ matrix.os }} - name: Test run: pnpm test shell: bash From 0dc26536cc8fb7474cb5f78e75c4df45ca939728 Mon Sep 17 00:00:00 2001 From: cm-ayf Date: Thu, 23 May 2024 07:28:09 +0900 Subject: [PATCH 2/2] not really all --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 616fe57..391a44d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -66,7 +66,7 @@ jobs: cache: pnpm - name: Install dependencies run: pnpm install - - name: Download All Artifacts + - name: Download Artifact uses: actions/download-artifact@v4 with: name: test-build-${{ matrix.os }}