Skip to content
Merged
Show file tree
Hide file tree
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
41 changes: 41 additions & 0 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Full Test Suite

on:
push:
branches:
- main
pull_request:

concurrency:
group: full-test-suite-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"

jobs:
tests:
name: Full Test Suite (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Install Nix
uses: cachix/install-nix-action@v31

- name: Enable Nix cache
uses: DeterminateSystems/magic-nix-cache-action@v13

- name: Run full test suite
run: ./scripts/test-suite.sh
30 changes: 30 additions & 0 deletions scripts/test-suite.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env bash
set -euo pipefail

usage() {
cat <<'USAGE'
Usage:
scripts/test-suite.sh

Runs the full Rust test suite from the workspace:
1) cargo test --workspace --all-targets
2) cargo test --workspace --release
USAGE
}

if [[ ${1:-} == "-h" || ${1:-} == "--help" ]]; then
usage
exit 0
fi

script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
repo_root="$(cd "${script_dir}/.." && pwd)"
cd "$repo_root"

echo "[test-suite] cargo test --workspace --all-targets"
nix develop -c cargo test --workspace --all-targets

echo "[test-suite] cargo test --workspace --release"
nix develop -c cargo test --workspace --release

echo "[test-suite] all tests passed"
Loading