-
Notifications
You must be signed in to change notification settings - Fork 10
47 lines (40 loc) · 1008 Bytes
/
pull_request_workflow.yml
File metadata and controls
47 lines (40 loc) · 1008 Bytes
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
on:
workflow_call:
inputs:
platform:
required: true
type: string
permissions:
contents: read
pull-requests: read
jobs:
rust-fmt-check:
runs-on: ${{inputs.platform}}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run rust-fmt
run: cargo fmt --all -- --check
setup-and-build:
uses: ./.github/workflows/setup-and-build.yml
needs: rust-fmt-check
with:
platform: ${{inputs.platform}}
unit-test:
runs-on: ${{inputs.platform}}
needs: setup-and-build
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Restore Rust Dependencies
uses: actions/cache/restore@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{inputs.platform}}-${{github.sha}}
- name: Run Unit Tests
run: cargo test --no-fail-fast