-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (45 loc) · 1.31 KB
/
ci.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
49
50
51
52
53
54
55
56
57
58
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
# TODO: change to dtolnay/rust-toolchain@stable once 1.75.0 lands on stable
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: clippy,rustfmt
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- run: cargo install cargo-machete --locked
- run: cargo install cargo-deny --locked
- run: touch requirements.txt
- uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip" # caching pip dependencies
- run: rm requirements.txt
- run: pip install pre-commit
- uses: actions/checkout@v3
- run: pre-commit run --all-files --hook-stage push
- name: rust-grcov
uses: actions-rs/grcov@v0.1
- name: Codecov
uses: codecov/codecov-action@v4-beta
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
# Repository upload token - get it from codecov.io. Required only for private repositories
# token: # optional
# Specify whether the Codecov output should be verbose
verbose: true
fail_ci_if_error: true