-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (34 loc) · 955 Bytes
/
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
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
- 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: cargo build --all-features
- run: pre-commit install --hook-type pre-commit
- run: pre-commit install --hook-type pre-push
- run: bash .git/hooks/pre-commit
- run: bash .git/hooks/pre-push