Repository navigation
54 lines (50 loc) · 2.13 KB
/
Copy pathchecks.yml
File metadata and controls
54 lines (50 loc) · 2.13 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
name: Checks
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
concurrency:
group: checks-${{ github.ref }}
cancel-in-progress: true
jobs:
rust-lint:
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: ./.github/actions/setup-nix
- name: Check Rust formatting
run: |
nix develop --no-update-lock-file .#checks --command cargo fmt --all --check
nix develop --no-update-lock-file .#checks --command cargo fmt --manifest-path bindings/uniffi-bindgen/Cargo.toml --all --check
- name: Run Clippy
run: |
CARGO_TARGET_DIR="$(mktemp -d /tmp/cargo-target-bindings-lint-XXXXXX)"
export CARGO_TARGET_DIR
nix develop --no-update-lock-file .#checks --command cargo clippy --locked --workspace --all-targets -- -D warnings
nix develop --no-update-lock-file .#checks --command cargo clippy --locked --manifest-path bindings/uniffi-bindgen/Cargo.toml --all-targets -- -D warnings
checks:
runs-on: ubuntu-24.04
timeout-minutes: 45
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: ./.github/actions/setup-nix
- name: Lint all tracked shell scripts
run: nix develop --no-update-lock-file .#checks --command bash -euo pipefail -c 'git ls-files -z -- "*.sh" | xargs -0 -r shellcheck'
- name: Verify locked Nix configuration
run: nix flake check --no-update-lock-file
- name: Check release tooling and recipes
shell: bash
run: |
CARGO_TARGET_DIR="$(mktemp -d /tmp/cargo-target-bindings-checks-XXXXXX)"
export CARGO_TARGET_DIR
nix develop --no-update-lock-file .#build --command cargo check --locked --workspace
nix develop --no-update-lock-file .#build --command cargo test --locked --workspace
nix develop --no-update-lock-file .#build --command scripts/build-check.sh
git diff --exit-code