name: "Run tests"
description: "Runs the tests"

runs:
  using: "composite"
  steps:
    - name: Install Rust
      shell: bash -euxo pipefail {0}
      run: |
        cargo install cargo-nextest

    - name: Install Node
      uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
      with:
        node-version: "18"

    - name: Limit target directory size
      shell: bash -euxo pipefail {0}
      run: script/clear-target-dir-if-larger-than 100

    - name: Run tests
      shell: bash -euxo pipefail {0}
      run: cargo nextest run --workspace --no-fail-fast
