-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (51 loc) · 1.85 KB
/
Copy pathquality.yml
File metadata and controls
64 lines (51 loc) · 1.85 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
name: Quality checks
on:
workflow_call:
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
CARGO_TARGET_DIR: target
RUSTFLAGS: -D warnings
jobs:
quality:
name: quality
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@1.97.0
with:
components: clippy,rustfmt
- name: Restore Rust cache
uses: Swatinem/rust-cache@v2.9.1
- name: Check formatting
run: cargo fmt --all --check
- name: Run Clippy
run: cargo clippy --all-targets --locked -- -D warnings
- name: Run full test suite
run: cargo test --all-targets --locked
- name: Verify standalone lazy runtime state
shell: bash
run: |
cargo build --locked --bin cf-integration
sandbox=$(mktemp -d)
binary="$GITHUB_WORKSPACE/target/debug/cf-integration"
if (cd "$sandbox" && CF_INTEGRATION_DIR="$sandbox/state" "$binary" conformance report); then
echo "report unexpectedly succeeded without prior results" >&2
exit 1
fi
test ! -e "$sandbox/state"
if (cd "$sandbox" && CF_INTEGRATION_DIR="$sandbox/state" "$binary" stack config --lane external); then
echo "stack config unexpectedly succeeded outside a checkout" >&2
exit 1
fi
test -f "$sandbox/state/secrets.env"
find "$sandbox/state/assets" \
-path '*/docker/docker-compose.cf-integration.yaml' \
-type f -print -quit | grep -q .
- name: Verify published package
run: cargo package --locked
- name: Validate GitHub Actions workflows
run: go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.12