Skip to content

Commit

Permalink
share .node between tests (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
cm-ayf authored May 23, 2024
1 parent 0625b4d commit a856a8a
Showing 1 changed file with 36 additions and 4 deletions.
40 changes: 36 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
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
- uses: pnpm/action-setup@v3
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
node-version: 20
check-latest: true
cache: pnpm
- name: Install
Expand All @@ -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 Artifact
uses: actions/download-artifact@v4
with:
name: test-build-${{ matrix.os }}
- name: Test
run: pnpm test
shell: bash

0 comments on commit a856a8a

Please sign in to comment.