-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.16 KB
/
push.yaml
File metadata and controls
51 lines (42 loc) · 1.16 KB
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
49
50
51
name: Push
on: [push]
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Install toolchain
id: toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: clippy, rustfmt
- name: Set up cache
uses: actions/cache@v2
with:
path: |
~/.cargo/
target/
key: cargo-${{ runner.os }}-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }}
restore-keys: |
cargo-${{ runner.os }}-${{ steps.toolchain.outputs.rustc_hash }}-
- name: cargo fmt
run: cargo fmt --all -- --check
shell: bash
- name: cargo clippy
run: cargo clippy -- -D clippy::all
shell: bash
- name: cargo build
run: cargo build
shell: bash
- name: cargo test
run: cargo test -- --nocapture
shell: bash
- name: cargo package
run: cargo package
shell: bash