Documentation
name: Run cargo test

on:
    push:
        branches: ["main"]
    pull_request:
        branches: ["main"]

env:
    CARGO_TERM_COLOR: always

jobs:
    tests:
        runs-on: ubuntu-latest
        steps:
            - uses: actions/checkout@v3
            - name: Build
              run: cargo build --verbose
            - name: Prepare for tests
              run: python tests/get_figures.py
            - name: Run tests
              run: cargo test --verbose  -- --test-threads=1
            - name: Run tests untyped
              run: cargo test --verbose --no-default-features -- --test-threads=1
            - uses: taiki-e/install-action@cargo-hack
            - name: Run hack tests
              run: cargo hack test --feature-powerset --all-targets