open-standards/.github/workflows/tests-in-ci.yml
Transaction Science cdbe206cc7 ci: every wai-rs test file is run by a job or listed, and none can run empty
The conformance workflows name the tests they run. Thirty-eight test files of
wai-rs were named by no step, so no job ran them, and forty-nine feature-gated
ones had no required-features, so a step without the feature would have run
them empty and reported ok.

- scripts/check-tests-in-ci.py, with a self-test, in a new unfiltered workflow:
  every tests/*.rs is named by a step or listed with its reason in
  tests/NOT-IN-CI.txt, and every feature-gated one declares its features.
- Ten real tests join steps: the integer video and world tests and the JPEG AI
  bitstream reader (fast kernels, both builds), world replay, the world model
  and the shared integer world (a new step), the semantic path (codec-wrappers).
- Twenty-eight are listed: each compares the JPEG AI decoder with reference
  values that are not in the tree, and returns without checking when they are
  absent.
- Cargo.toml declares required-features for every feature-gated test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-13 01:20:48 -04:00

41 lines
1.5 KiB
YAML

name: tests in CI
# Every integration test of the reference crate is run by a job, and none can run
# empty.
#
# The conformance workflows name the tests they run, one `--test NAME` at a time. A test
# file nobody adds to a step never runs, and a feature-gated one compiled in a step that
# lacks its feature reports `ok` with no test in it. Both have happened here, silently.
# scripts/check-tests-in-ci.py requires that every test file is named by a step or
# listed, with its reason, in the crate's tests/NOT-IN-CI.txt, and that every
# feature-gated one declares its features in Cargo.toml, so that cargo refuses to build
# it without them.
#
# No `paths:` filter, on purpose. On this forge a filter matches the files of the push,
# not of the pull request, so a later push that touches no test would leave the head with
# no run of this check. The job takes seconds: it reads files and builds nothing.
# One run per branch at a time. A push supersedes the run before it.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches: [main]
pull_request:
jobs:
covered:
name: every test file is run by a job or listed with its reason
runs-on: linux
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
# The check must be able to fail, or it is decoration.
- name: The check fails closed (self-test)
run: ./scripts/check-tests-in-ci-selftest.sh
- name: Every test file is run or listed, and none can run empty
run: python3 -I scripts/check-tests-in-ci.py