Skip to content

Commit 4ddd8d1

Browse files
More minimalistic take on CI
1 parent aad71de commit 4ddd8d1

File tree

3 files changed

+48
-200
lines changed

3 files changed

+48
-200
lines changed

.github/workflows/test.yml

Lines changed: 19 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -21,53 +21,15 @@ jobs:
2121
- name: ✨ Run tests
2222
shell: bash
2323
run: |
24-
just test-ci
24+
set -euo pipefail
2525
26-
nostd:
27-
runs-on: depot-ubuntu-24.04-32
28-
29-
container:
30-
image: ghcr.io/facet-rs/facet-ci:latest-amd64
31-
steps:
32-
- uses: actions/checkout@v4
33-
34-
- uses: Swatinem/rust-cache@v2
35-
36-
- name: ✨ Run nostd tests
37-
shell: bash
38-
run: |
39-
just nostd-ci
40-
41-
doc-tests:
42-
runs-on: depot-ubuntu-24.04-32
43-
44-
container:
45-
image: ghcr.io/facet-rs/facet-ci:latest-amd64
46-
steps:
47-
- uses: actions/checkout@v4
48-
49-
- uses: Swatinem/rust-cache@v2
50-
51-
- name: ✨ Run doc tests
52-
shell: bash
53-
run: |
54-
just doc-tests-ci
55-
56-
miri:
57-
runs-on: depot-ubuntu-24.04-64
58-
59-
container:
60-
image: ghcr.io/facet-rs/facet-ci:latest-miri-amd64
61-
steps:
62-
- uses: actions/checkout@v4
26+
echo "::group::All tests except doc-tests"
27+
cargo nextest run --all-features
28+
echo "::endgroup::"
6329
64-
- uses: Swatinem/rust-cache@v2
65-
66-
- name: ✨ Run miri
67-
shell: bash
68-
run: |
69-
export CI=true
70-
just miri
30+
echo "::group::Doc tests"
31+
cargo test --doc --all-features
32+
echo "::endgroup::"
7133
7234
msrv:
7335
runs-on: depot-ubuntu-24.04-32
@@ -84,7 +46,11 @@ jobs:
8446
- name: ✨ Check MSRV
8547
shell: bash
8648
run: |
87-
just msrv
49+
set -euo pipefail
50+
51+
cargo hack check --each-feature --locked \
52+
--rust-version --ignore-private --workspace \
53+
--keep-going --exclude-no-default-features
8854
8955
minimal-versions:
9056
runs-on: depot-ubuntu-24.04-32
@@ -99,10 +65,14 @@ jobs:
9965
- name: ✨ Check minimal versions
10066
shell: bash
10167
run: |
68+
set -euo pipefail
69+
10270
# Install nightly for minimal-versions feature
10371
rustup toolchain install nightly
72+
10473
# Generate lockfile with minimal versions
10574
cargo +nightly generate-lockfile -Z minimal-versions
75+
10676
# Check with stable using minimal versions
10777
cargo check --workspace --all-features --locked --keep-going
10878
@@ -121,7 +91,9 @@ jobs:
12191
env:
12292
RUSTDOCFLAGS: -D warnings
12393
run: |
124-
just docs
94+
set -euo pipefail
95+
96+
cargo doc --workspace --all-features --no-deps --document-private-items --keep-going
12597
12698
lockfile:
12799
runs-on: depot-ubuntu-24.04-4
@@ -172,56 +144,3 @@ jobs:
172144
shell: bash
173145
run: |
174146
cargo clippy --workspace --all-features --all-targets --keep-going -- -D warnings --allow deprecated
175-
176-
test-macos:
177-
runs-on: depot-macos-latest
178-
steps:
179-
- uses: actions/checkout@v4
180-
181-
- uses: Swatinem/rust-cache@v2
182-
183-
- uses: taiki-e/install-action@v2
184-
with:
185-
tool: cargo-nextest
186-
187-
- name: ✨ Run nextest tests (macOS)
188-
shell: bash
189-
run: |
190-
cargo nextest run --all-features
191-
192-
test-windows:
193-
runs-on: depot-windows-2022
194-
steps:
195-
- uses: actions/checkout@v4
196-
197-
- uses: taiki-e/install-action@v2
198-
with:
199-
tool: cargo-nextest
200-
201-
- name: ✨ Run nextest tests (Windows)
202-
shell: bash
203-
run: |
204-
cargo nextest run --all-features
205-
206-
coverage:
207-
runs-on: depot-ubuntu-24.04-32
208-
209-
container:
210-
image: ghcr.io/facet-rs/facet-ci:latest-miri-amd64
211-
steps:
212-
- uses: actions/checkout@v4
213-
214-
- uses: Swatinem/rust-cache@v2
215-
216-
- name: ✨ Gather coverage
217-
shell: bash
218-
run: |
219-
cargo llvm-cov --no-report nextest
220-
cargo llvm-cov --no-report --doc
221-
mkdir coverage
222-
cargo llvm-cov report --doctests --lcov --output-path coverage/lcov.info
223-
224-
- name: ✨ Publish to Coveralls
225-
uses: coverallsapp/github-action@master
226-
with:
227-
github-token: ${{ secrets.GITHUB_TOKEN }}

src/.github/workflows/test.yml

Lines changed: 19 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -21,53 +21,15 @@ jobs:
2121
- name: ✨ Run tests
2222
shell: bash
2323
run: |
24-
just test-ci
24+
set -euo pipefail
2525
26-
nostd:
27-
runs-on: depot-ubuntu-24.04-32
28-
29-
container:
30-
image: ghcr.io/facet-rs/facet-ci:latest-amd64
31-
steps:
32-
- uses: actions/checkout@v4
33-
34-
- uses: Swatinem/rust-cache@v2
35-
36-
- name: ✨ Run nostd tests
37-
shell: bash
38-
run: |
39-
just nostd-ci
40-
41-
doc-tests:
42-
runs-on: depot-ubuntu-24.04-32
43-
44-
container:
45-
image: ghcr.io/facet-rs/facet-ci:latest-amd64
46-
steps:
47-
- uses: actions/checkout@v4
48-
49-
- uses: Swatinem/rust-cache@v2
50-
51-
- name: ✨ Run doc tests
52-
shell: bash
53-
run: |
54-
just doc-tests-ci
55-
56-
miri:
57-
runs-on: depot-ubuntu-24.04-64
58-
59-
container:
60-
image: ghcr.io/facet-rs/facet-ci:latest-miri-amd64
61-
steps:
62-
- uses: actions/checkout@v4
26+
echo "::group::All tests except doc-tests"
27+
cargo nextest run --all-features
28+
echo "::endgroup::"
6329
64-
- uses: Swatinem/rust-cache@v2
65-
66-
- name: ✨ Run miri
67-
shell: bash
68-
run: |
69-
export CI=true
70-
just miri
30+
echo "::group::Doc tests"
31+
cargo test --doc --all-features
32+
echo "::endgroup::"
7133
7234
msrv:
7335
runs-on: depot-ubuntu-24.04-32
@@ -84,7 +46,11 @@ jobs:
8446
- name: ✨ Check MSRV
8547
shell: bash
8648
run: |
87-
just msrv
49+
set -euo pipefail
50+
51+
cargo hack check --each-feature --locked \
52+
--rust-version --ignore-private --workspace \
53+
--keep-going --exclude-no-default-features
8854
8955
minimal-versions:
9056
runs-on: depot-ubuntu-24.04-32
@@ -99,10 +65,14 @@ jobs:
9965
- name: ✨ Check minimal versions
10066
shell: bash
10167
run: |
68+
set -euo pipefail
69+
10270
# Install nightly for minimal-versions feature
10371
rustup toolchain install nightly
72+
10473
# Generate lockfile with minimal versions
10574
cargo +nightly generate-lockfile -Z minimal-versions
75+
10676
# Check with stable using minimal versions
10777
cargo check --workspace --all-features --locked --keep-going
10878
@@ -121,7 +91,9 @@ jobs:
12191
env:
12292
RUSTDOCFLAGS: -D warnings
12393
run: |
124-
just docs
94+
set -euo pipefail
95+
96+
cargo doc --workspace --all-features --no-deps --document-private-items --keep-going
12597
12698
lockfile:
12799
runs-on: depot-ubuntu-24.04-4
@@ -172,56 +144,3 @@ jobs:
172144
shell: bash
173145
run: |
174146
cargo clippy --workspace --all-features --all-targets --keep-going -- -D warnings --allow deprecated
175-
176-
test-macos:
177-
runs-on: depot-macos-latest
178-
steps:
179-
- uses: actions/checkout@v4
180-
181-
- uses: Swatinem/rust-cache@v2
182-
183-
- uses: taiki-e/install-action@v2
184-
with:
185-
tool: cargo-nextest
186-
187-
- name: ✨ Run nextest tests (macOS)
188-
shell: bash
189-
run: |
190-
cargo nextest run --all-features
191-
192-
test-windows:
193-
runs-on: depot-windows-2022
194-
steps:
195-
- uses: actions/checkout@v4
196-
197-
- uses: taiki-e/install-action@v2
198-
with:
199-
tool: cargo-nextest
200-
201-
- name: ✨ Run nextest tests (Windows)
202-
shell: bash
203-
run: |
204-
cargo nextest run --all-features
205-
206-
coverage:
207-
runs-on: depot-ubuntu-24.04-32
208-
209-
container:
210-
image: ghcr.io/facet-rs/facet-ci:latest-miri-amd64
211-
steps:
212-
- uses: actions/checkout@v4
213-
214-
- uses: Swatinem/rust-cache@v2
215-
216-
- name: ✨ Gather coverage
217-
shell: bash
218-
run: |
219-
cargo llvm-cov --no-report nextest
220-
cargo llvm-cov --no-report --doc
221-
mkdir coverage
222-
cargo llvm-cov report --doctests --lcov --output-path coverage/lcov.info
223-
224-
- name: ✨ Publish to Coveralls
225-
uses: coverallsapp/github-action@master
226-
with:
227-
github-token: ${{ secrets.GITHUB_TOKEN }}

src/main.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,16 @@ fn enqueue_github_workflow_jobs(sender: std::sync::mpsc::Sender<Job>) {
270270
use std::fs;
271271
let workflow_path = Path::new(".github/workflows/test.yml");
272272
let old_content = fs::read(workflow_path).ok();
273+
274+
// Check if the old content contains the handwritten marker
275+
if let Some(content) = &old_content {
276+
if let Ok(content_str) = String::from_utf8(content.clone()) {
277+
if content_str.contains("# HANDWRITTEN: facet-dev") {
278+
return;
279+
}
280+
}
281+
}
282+
273283
let new_content = GITHUB_TEST_WORKFLOW.as_bytes().to_vec();
274284
let job = Job {
275285
path: workflow_path.to_path_buf(),

0 commit comments

Comments
 (0)