-
Notifications
You must be signed in to change notification settings - Fork 4
39 lines (38 loc) · 1.07 KB
/
rust.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
name: tests
on:
push: { branches: ["master", "main"] }
pull_request: { branches: "*" }
jobs:
build_and_test:
name: Build and test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace --all-targets --all-features --color=always
env:
RUSTFLAGS: -Dwarnings
- name: Clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --workspace --all-targets --all-features
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --all-targets --all-features --color=always
env:
RUSTFLAGS: -Dwarnings