This repository was archived by the owner on Jun 9, 2026. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
156 lines (119 loc) · 3.91 KB
/
Copy pathtest.yml
File metadata and controls
156 lines (119 loc) · 3.91 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# GENERATED: this file is generated by https://github.com/facet-rs/facet-dev
name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
merge_group:
jobs:
test:
runs-on: depot-ubuntu-24.04-32
container:
image: ghcr.io/facet-rs/facet-ci:latest-amd64
steps:
- uses: actions/checkout@v6
- uses: Swatinem/rust-cache@v2
- name: ✨ Run tests
shell: bash
run: |
set -euo pipefail
echo "::group::All tests except doc-tests"
cargo nextest run --all-features
echo "::endgroup::"
echo "::group::Doc tests"
output=$(cargo test --doc --all-features 2>&1) || exit_code=$?
if [ "${exit_code:-0}" -ne 0 ]; then
if [ $exit_code -eq 101 ] && echo "$output" | grep -q "no library targets found in package"; then
echo "No library targets found, skipping doc tests"
else
echo "$output"
exit $exit_code
fi
fi
echo "::endgroup::"
msrv:
runs-on: depot-ubuntu-24.04-32
container:
image: ghcr.io/facet-rs/facet-ci:latest-amd64
steps:
- uses: actions/checkout@v6
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@cargo-hack
- name: ✨ Check MSRV
shell: bash
run: |
set -euo pipefail
cargo hack check --each-feature --locked \
--rust-version --workspace \
--keep-going --exclude-no-default-features
minimal-versions:
runs-on: depot-ubuntu-24.04-32
container:
image: ghcr.io/facet-rs/facet-ci:latest-amd64
steps:
- uses: actions/checkout@v6
- uses: Swatinem/rust-cache@v2
- name: ✨ Check minimal versions
shell: bash
run: |
set -euo pipefail
# Install nightly for minimal-versions feature
rustup toolchain install nightly
# Generate lockfile with minimal versions
cargo +nightly generate-lockfile -Z minimal-versions
# Check with stable using minimal versions
cargo check --workspace --all-features --locked --keep-going
docs:
runs-on: depot-ubuntu-24.04-32
container:
image: ghcr.io/facet-rs/facet-ci:latest-amd64
steps:
- uses: actions/checkout@v6
- uses: Swatinem/rust-cache@v2
- name: ✨ Check documentation
shell: bash
env:
RUSTDOCFLAGS: -D warnings
run: |
set -euo pipefail
cargo doc --workspace --all-features --no-deps --document-private-items --keep-going
lockfile:
runs-on: depot-ubuntu-24.04-4
container:
image: ghcr.io/facet-rs/facet-ci:latest-amd64
steps:
- uses: actions/checkout@v6
- uses: Swatinem/rust-cache@v2
- name: ✨ Check lockfile is updated
shell: bash
run: |
cargo update --workspace --locked
clippy:
runs-on: depot-ubuntu-24.04-16
container:
image: ghcr.io/facet-rs/facet-ci:latest-amd64
permissions:
security-events: write # to upload sarif results
steps:
- uses: actions/checkout@v6
- uses: Swatinem/rust-cache@v2
- name: Install SARIF tools
shell: bash
run: |
cargo install clippy-sarif --locked
cargo install sarif-fmt --locked
- name: ✨ Run clippy with SARIF output
shell: bash
run: |
cargo clippy --workspace --all-features --all-targets --message-format=json | clippy-sarif | tee clippy-results.sarif | sarif-fmt
continue-on-error: true
- name: Upload SARIF results
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: clippy-results.sarif
wait-for-processing: true
- name: Report status
shell: bash
run: |
cargo clippy --workspace --all-features --all-targets --keep-going -- -D warnings --allow deprecated