We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4fa0418 commit 0e5306dCopy full SHA for 0e5306d
.github/actions/test/action.yml
@@ -5,6 +5,11 @@ inputs:
5
TARGET:
6
required: true
7
8
+ SUDO:
9
+ description: 'Set it to an empty string to run the tests as the current user, leave it with the default value to test with "sudo"'
10
+ required: false
11
+ default: sudo --preserve-env=HOME
12
+
13
TOOL:
14
description: 'Tool used to involve the test command, can be cargo or cross'
15
required: false
@@ -24,4 +29,4 @@ runs:
24
29
25
30
- name: test
26
31
shell: bash
27
- run: ${{ inputs.TOOL }} test --target ${{ inputs.TARGET }} --all-features
32
+ run: ${{ inputs.SUDO }} $(which ${{ inputs.TOOL }}) test --target ${{ inputs.TARGET }} --all-features
.github/workflows/ci.yml
@@ -92,6 +92,7 @@ jobs:
92
uses: ./.github/actions/test
93
with:
94
TARGET: '${{ matrix.target }}'
95
+ SUDO: ""
96
TOOL: cross
97
RUSTFLAGS: --cfg qemu -D warnings
98
0 commit comments