-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (38 loc) · 1.12 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
49
50
51
52
53
54
55
56
57
58
name: Rust
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Rust Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt-get install -y sqlite3
- name: Setup development database
run: sqlite3 apt-cacher-rs.db < db.sqlite
- name: Build
run: cargo build --verbose
- name: Format
run: cargo fmt --all --check
- name: Clippy
run: cargo clippy --all-targets --all-features -- -W clippy::pedantic
- name: Run tests
run: cargo test --verbose
spaces-check:
name: Spaces Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Spaces check
run: git diff-tree --check $(git hash-object -t tree /dev/null) HEAD
spellings:
name: Codespell
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install codespell
run: sudo apt-get install -y codespell
- name: Run codespell
run: codespell -L crate src/ apt-cacher-rs.conf apt-cacher-rs.init apt-cacher-rs.service README.md