Skip to content

Run tests in CI

Run tests in CI #1

Workflow file for this run

#
name: CI
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize]
paths-ignore:
- "**/*.md"
- "**/*.yml"
- "!.github/workflows/ci.yml"
push:
branches:
- main
- test-automation
paths-ignore:
- "**/*.md"
- "**/*.yml"
- "!.github/workflows/ci.yml"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
jobs:
test:
name: Test
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: macos-14
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: Boshen/setup-rust@main
with:
# warm cache factory for all other CI jobs
# cache `target` directory to avoid download crates
save-cache: ${{ github.ref_name == 'main' }}
cache-key: warm
- run: cargo check
- run: cargo test
- run: git diff --exit-code # Must commit everything
napi:
name: Test NAPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Boshen/setup-rust@main
with:
# warm cache factory for all other CI jobs
# cache `target` directory to avoid download crates
save-cache: ${{ github.ref_name == 'main' }}
cache-key: warm
- uses: ./.github/actions/setup
- run: yarn build
- run: node napi/test/sanity.spec.mjs