-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (53 loc) · 1.39 KB
/
test.yml
File metadata and controls
56 lines (53 loc) · 1.39 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
52
53
54
55
56
name: Check, test, and build the code
on:
push:
schedule:
- cron: 15 */6 * * *
jobs:
check:
name: Check the code
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust: [nightly]
steps:
- name: Install the appropriate Rust toolchain
run: |
rustup toolchain install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
- uses: actions/checkout@v1
- name: Run rustfmt
run: |
rustup component add rustfmt
cargo fmt -- --check
- name: Run clippy
run: |
rustup component add clippy
cargo clippy -- -D clippy::all -W clippy::cargo -W clippy::pedantic
test:
name: Run tests and measure coverage
runs-on: ubuntu-latest
strategy:
matrix:
rust: [nightly]
steps:
- name: Install the appropriate Rust toolchain
run: |
rustup toolchain install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
- uses: actions/checkout@v1
- name: Run tests
run: |
cargo test
- name: Generate and upload coverage
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
cargo install --force cargo-tarpaulin
cargo tarpaulin --out Xml
bash <(curl -s https://codecov.io/bash)
- uses: actions/upload-artifact@master
with:
name: cobertura.xml
path: cobertura.xml