Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

share .node between tests #33

Merged
merged 2 commits into from
May 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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