name: Tests

on:
  push:
  workflow_dispatch:

jobs:
  cargo-test:
    name: cargo test
    runs-on: ubuntu-latest

    steps:
      - name: Checkout sources
        uses: actions/checkout@v4

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@stable

      - name: Cache cargo artifacts
        uses: Swatinem/rust-cache@v2

      - name: Run tests
        run: cargo test --workspace --all-targets --all-features --locked

