-
Notifications
You must be signed in to change notification settings - Fork 7
/
action.yml
48 lines (46 loc) · 1.27 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: "Run Tests"
description: "Run Tests"
branding:
icon: "archive"
color: "gray-dark"
inputs:
test-name:
description: "Test name to run"
required: true
threads:
description: "Number of test threads"
required: false
default: "num-cpus"
archive-file:
description: "Archive file to use for tests"
required: true
default: "~/test_archive.tar.zst"
success-output:
description: "Success output"
required: false
default: "immediate-final"
status-level:
description: "Output status level"
required: false
default: "fail"
retries:
description: "Number of test retries"
required: false
default: "0"
runs:
using: "composite"
steps:
- name: Run Tests
id: run-tests
shell: bash
run: |
cargo nextest run \
--verbose \
--archive-file ${{ inputs.archive-file }} \
${{ inputs.threads == '1' && '--no-capture' || format('--test-threads {0}', inputs.threads) }} \
--retries ${{ inputs.retries }} \
--run-ignored all \
--fail-fast \
${{ inputs.threads != '1' && format('--success-output {0}', inputs.success-output) || '' }} \
--status-level ${{ inputs.status-level }} \
-E "test(=${{ inputs.test-name }})"