Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[profile.default]
# Keep running the rest of the suite after a failure, so one broken test
# doesn't hide the results of every test that would have run after it.
# (Process-per-test isolation is nextest's own default, not set here.)
fail-fast = false
37 changes: 35 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ jobs:
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all --check
- run: cargo clippy --workspace -- -D warnings
# Corpus-driven tests skip gracefully when the sample data is absent.
- run: cargo test --workspace
# Corpus/archive tests are #[ignore]d and need real data; run with --ignored locally.
- uses: taiki-e/install-action@nextest
- run: cargo nextest run --workspace
- run: cargo test --workspace --doc

wasm-core:
runs-on: ubuntu-latest
Expand All @@ -52,3 +54,34 @@ jobs:
working-directory: webui
- run: npm run build
working-directory: webui

coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
# Instrumented builds use different RUSTFLAGS, so they get their own cache key.
- uses: Swatinem/rust-cache@v2
with:
key: llvm-cov
- uses: taiki-e/install-action@cargo-llvm-cov
- uses: taiki-e/install-action@nextest
- run: cargo llvm-cov nextest --workspace --lcov --output-path lcov.info
- run: cargo llvm-cov report --summary-only >> "$GITHUB_STEP_SUMMARY"
- uses: actions/upload-artifact@v4
with:
name: coverage-lcov
path: lcov.info

no-silent-skips:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Fail if a test silently returns on missing corpus
run: |
if grep -rEn 'corpus_root\(\)\s*else\s*\{|(std::)?env::var\("XAERO_[A-Z_]*CORPUS"\)\s*else\s*\{' crates; then
echo "::error::Found a silent corpus/env else-skip. Use #[ignore] + .expect(), not a silent return."
exit 1
fi
15 changes: 15 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,22 @@ permissions:
attestations: write

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@nextest
- run: cargo fmt --all --check
- run: cargo clippy --workspace -- -D warnings
- run: cargo nextest run --workspace
- run: cargo test --workspace --doc

build:
needs: test
strategy:
fail-fast: false
matrix:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ vault.db
pyramid.db
*.db-shm
*.db-wal

# Coverage output (cargo llvm-cov)
lcov.info
156 changes: 156 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[workspace]
resolver = "2"
members = ["crates/xaero-core", "crates/xaero-db", "crates/xaero-merge", "crates/xaero-scan", "crates/xaerotools-server", "crates/xaerotools-cli", "tools/xaero-colorgen"]
members = ["crates/xaero-core", "crates/xaero-db", "crates/xaero-merge", "crates/xaero-scan", "crates/xaerotools-server", "crates/xaerotools-cli", "tools/xaero-colorgen", "crates/test-support"]

[workspace.package]
version = "0.4.0"
edition = "2021"
rust-version = "1.89"
license = "MIT"
authors = ["XaeroTools contributors"]
repository = "https://github.com/dekrom/xaerotools"
Expand Down
Loading
Loading