action.yml

 1name: "Run tests"
 2description: "Runs the tests"
 3
 4inputs:
 5  use-xvfb:
 6    description: "Whether to run tests with xvfb"
 7    required: false
 8    default: "false"
 9
10runs:
11  using: "composite"
12  steps:
13    - name: Install Rust
14      shell: bash -euxo pipefail {0}
15      run: |
16        cargo install cargo-nextest --locked
17
18    - name: Install Node
19      uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
20      with:
21        node-version: "18"
22
23    - name: Limit target directory size
24      shell: bash -euxo pipefail {0}
25      run: script/clear-target-dir-if-larger-than 100
26
27    - name: Run tests
28      shell: bash -euxo pipefail {0}
29      run: |
30        if [ "${{ inputs.use-xvfb }}" == "true" ]; then
31          xvfb-run --auto-servernum --server-args="-screen 0 1024x768x24 -nolisten tcp" cargo nextest run --workspace --no-fail-fast
32        else
33          cargo nextest run --workspace --no-fail-fast
34        fi