Skip to content

Commit a82b837

Browse files
committed
Merge remote-tracking branch 'origin/master'
# Conflicts: # .github/workflows/common.yml # .github/workflows/rust.yml
2 parents 60f44f8 + de1d308 commit a82b837

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/runtest.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Run Test
2+
on:
3+
workflow_call:
4+
inputs:
5+
target:
6+
required: true
7+
type: string
8+
channel:
9+
required: true
10+
type: boolean
11+
target-feature:
12+
required: false
13+
type: string
14+
default: ''
15+
jobs:
16+
test:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v3
20+
21+
- run: ${{ format('echo "{0}" >> $GITHUB_ENV', inputs.target-feature) }}
22+
23+
- name: Install Rust
24+
uses: actions-rs/toolchain@v1
25+
with:
26+
toolchain: ${{ inputs.channel }}
27+
target: ${{ inputs.target }}
28+
profile: minimal
29+
components: clippy
30+
override: true
31+
32+
- name: Clippy
33+
uses: actions-rs/cargo@v1
34+
with:
35+
command: clippy
36+
args: +${{ inputs.channel }} --target ${{ inputs.target }} ${{ inputs.channel == 'nightly' && '--features=nightly' || '' }}
37+
38+
- name: Build
39+
uses: actions-rs/cargo@v1
40+
with:
41+
use-cross: true
42+
command: build
43+
args: +${{ inputs.channel }} --target ${{ inputs.target }} ${{ inputs.channel == 'nightly' && '--features=nightly' || '' }}
44+
45+
- name: Test
46+
uses: actions-rs/cargo@v1
47+
with:
48+
use-cross: true
49+
command: test
50+
args: +${{ inputs.channel }} --target ${{ inputs.target }} ${{ inputs.channel == 'nightly' && '--features=nightly' || '' }}
51+

0 commit comments

Comments
 (0)