-
Notifications
You must be signed in to change notification settings - Fork 16
48 lines (47 loc) · 1.23 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
40
41
42
43
44
45
46
47
48
name: ci
on: [push, pull_request]
jobs:
ci:
name: ci
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: checkout repo
uses: actions/checkout@v3
with:
submodules: true
- name: install rustfmt clippy
run: rustup component add rustfmt clippy
- name: check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: check linting
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets --all-features -- -D warnings
- name: install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: run tests
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
- name: run doc tests
run: cargo test --doc
- name: upload coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
- name: check doc
run: cargo doc
env:
RUSTFLAGS: -D warnings