-
Notifications
You must be signed in to change notification settings - Fork 16
66 lines (54 loc) · 1.83 KB
/
Copy pathrust-quality.yml
File metadata and controls
66 lines (54 loc) · 1.83 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
57
58
59
60
61
62
63
64
65
66
name: Rust quality gate
on:
workflow_dispatch:
push:
branches: [ "*" ]
pull_request:
jobs:
quality:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-D warnings"
steps:
- uses: actions/checkout@v4
- name: Install GTK / WebKit / xtr build deps
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential pkg-config \
libgtk-4-dev libadwaita-1-dev libwebkitgtk-6.0-dev \
libgirepository1.0-dev \
gettext
- name: Install Rust toolchain (pinned via rust-toolchain.toml)
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: rustfmt
run: cargo fmt --all -- --check
- name: clippy (deny warnings)
run: cargo clippy --workspace --all-targets --locked -- -D warnings
- name: build (release, locked)
run: cargo build --release --workspace --locked
- name: test (release)
run: cargo test --release --workspace --locked
- name: cargo-deny (licences + advisories)
uses: EmbarkStudios/cargo-deny-action@v2
with:
command: check
arguments: --all-features
- name: cargo-machete (unused deps)
uses: bnjbvr/cargo-machete@v0.7.0
- name: i18n POT freshness
run: |
if ! command -v xtr >/dev/null 2>&1; then
cargo install --locked xtr
fi
bash scripts/update-translations.sh
if ! git diff --quiet -- po/biglinux-webapps.pot; then
echo "::error::POT is stale; run scripts/update-translations.sh and commit."
git --no-pager diff -- po/biglinux-webapps.pot | head -200
exit 1
fi