Skip to content

PhotoCraft: An open-source, photo editor written by scratch in pure Rust

ci: integrate nextest with early checks and runtime limits

skylartaylor40a7c204301a
diff --cc .github/workflows/ci.yml
index 31323da70,f2c7a2207..192a13d8b
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@@ -115,18 -119,21 +119,30 @@@ jobs
if: runner.os == 'Linux'
run: cargo fmt --all -- --check
+ - name: Clippy
+ run: cargo clippy --workspace --all-targets --locked --features heif -- -D warnings
+
+ - name: Dependency layering
+ run: cargo xtask layers
+
+ # docs/scorecard.md must match its sources (checklists, budgets, baseline, corpus floors,
+ # prefs audit). Static: it reads committed files only, no benchmarks run here.
+ - name: Scorecard up to date
+ if: runner.os == 'Linux'
+ run: cargo xtask scorecard --check
+
+ # cargo-nextest runs the test binaries in parallel (`cargo test` runs them one at a time) and
+ # its `ci` profile (.config/nextest.toml) stops at the first failure and fails hung tests.
+ - uses: taiki-e/install-action@83ac0ad63c0167e6f06796fab0fce28db1bf3db0 # v2.87.22
+ with:
+
# `--features heif`: official builds open HEIC photos via the optional photocraft-heif crate.
+ # nextest doesn't run doctests, so `cargo test --doc` does, with the same selection.
- name: Test
- run: cargo test --workspace --locked --features heif
+ run: |
+ cargo nextest run --workspace --locked --features heif --profile ci
+ cargo test --doc --workspace --locked --features heif
# The same codecs without the optional decoder: HEIC must stay a clear "not in this build"
# error for distributors who leave it out.
@@@ -152,21 -159,10 +168,10 @@@
env:
CRAFT_FONTS_DIR: ${{ github.workspace }}/craft-fonts
CRAFT_FONTS_REQUIRED: "1"
- run: cargo test --workspace --locked --features heif
+ run: cargo nextest run --workspace --locked --features heif --profile ci
- - name: Clippy
- run: cargo clippy --workspace --all-targets --locked --features heif -- -D warnings
-
- - name: Dependency layering
- run: cargo xtask layers
-
- # docs/scorecard.md must match its sources (checklists, budgets, baseline, corpus floors,
- # prefs audit). Static: it reads committed files only, no benchmarks run here.
- - name: Scorecard up to date
- if: runner.os == 'Linux'
- run: cargo xtask scorecard --check
-
corpus:
+ timeout-minutes: 30
# Real-file corpus tests (cargo feature `corpus`), on every PR and on main. The corpora are
# pinned in xtask/src/corpus_pins.rs and sha256-verified (xtask/*.sha256) after both a cache
# restore and a download; a missing corpus fails the tests. The cache key changes only when a