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
name: Test
on:
push:
branches:
pull_request:
branches:
jobs:
test:
strategy:
matrix:
rust:
os:
include:
- rust: stable
os: macos-latest
- rust: stable
os: windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
- uses: dtolnay/rust-toolchain@2c7215f132e9ebf062739d9130488b56d53c060c # master branch, pinned 2026-07-25
with:
toolchain: ${{ matrix.rust }}
# No cache: `make testdata` fetches the fixtures fresh each run (a small
# tarball). Caching only part of the fixture tree previously left the
# fetched-only `.conf` files absent on warm-cache jobs (#101 resurfaced),
# and caching the whole tree would clobber git-tracked fixtures with stale
# cached copies. Fetching is ~1-2s and always correct.
- name: Fetch testdata fixtures
run: make testdata
- run: cargo test
if: matrix.rust == 'stable'
# MSRV: remove criterion dev-dependency before testing because
# criterion's transitive dep clap_lex requires edition 2024
- name: Remove bench deps for MSRV
if: matrix.rust != 'stable'
run: |
sed -i '/\[dev-dependencies\]/,/^\[/{/criterion/d}' Cargo.toml
sed -i '/\[\[bench\]\]/,/^$/d' Cargo.toml
- run: cargo test
if: matrix.rust != 'stable'
- run: cargo test --features serde
if: matrix.rust == 'stable'
# The adapter and format-ingestion suites are `#![cfg(feature =
# "adapters")]`, so every run above compiles them to EMPTY test binaries
# that pass without asserting anything. Without this step the adapters
# ship untested — which is exactly how the F1.2 and F3.2 defects reached
# a release.
- run: cargo test --all-features
if: matrix.rust == 'stable'
# MSRV runs the adapter suites too, which is what keeps `rust-version`
# honest for EVERY feature combination rather than just the default
# build. It works because `toml` is capped to its 1.0 line (see
# Cargo.toml); if a dependency raises its MSRV past 1.82 this job fails,
# which is the drift detection a documentation-only note could not give.
- run: cargo test --all-features
if: matrix.rust != 'stable'
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
- uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4 # stable
# No cache — see the test job above.
- name: Fetch testdata fixtures
run: make testdata
- uses: taiki-e/install-action@e62b3bdab54265ba809383c8707cb0600da93f19 # cargo-llvm-cov
# --all-features so the adapter modules are measured too; under
# --features serde they were reported as uncovered dead code.
- run: cargo llvm-cov --all-features --lcov --output-path lcov.info
- uses: codecov/codecov-action@0fb7174895f61a3b6b78fc075e0cd60383518dac # v5
with:
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
slug: ${{ github.repository }}
fail_ci_if_error: false