Skip to content

Tests

Tests #314

Workflow file for this run

name: Tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions: {}
concurrency:
group: usagebench-tests-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
usagebench:
runs-on: ubuntu-latest
permissions:
contents: read
timeout-minutes: 30
steps:
- name: Checkout source
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
with:
fetch-depth: 1
lfs: true
persist-credentials: false
- name: Set up Rust
uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4 # stable
with:
toolchain: stable
- name: Run Rust tests
run: cargo test --locked
- name: Run Python tests
# The docs generators and the freeze-shard helpers are Python, and
# their suites ran nowhere on a pull request: only the reference
# environment, freeze, and reproduction-contract workflows invoked
# unittest, and each names a single file. Discovery keeps a new suite
# from being added and silently never run.
run: python3 -m unittest discover --start-directory tests --pattern 'test_*.py' --verbose
- name: Validate benchmark cases
run: cargo run --locked -- validate benchmarks/cases
- name: Validate citation metadata
uses: citation-file-format/cffconvert-github-action@4cf11baa70a673bfdf9dad0acc7ee33b3f4b6084 # 2.0.0
with:
args: '--validate'