Skip to content

docs: say what the parts answered, and where the models do not #39

docs: say what the parts answered, and where the models do not

docs: say what the parts answered, and where the models do not #39

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env:
PYTHON_VERSION: "3.12"
jobs:
lint:
name: Format and lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install ruff
run: pipx install ruff==0.16.3
- name: Check formatting
run: ruff format --check .
- name: Lint
run: ruff check --output-format=github .
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
with:
node-version: 22
cache: pnpm
- name: Install the formatter
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Check that every JSON file is formatted
run: pnpm run format:check
test:
name: Tests on Python ${{ matrix.python }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python: ["3.12", "3.13", "3.14"]
steps:
# The package reaches the processor through this submodule, and without it
# the microcode backend cannot be built at all. Checking it out here does
# not supply any firmware, so the runner still exercises the path a user
# without an image takes.
- uses: actions/checkout@v5
with:
submodules: recursive
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
- name: Install coverage
run: python -m pip install --disable-pip-version-check coverage==7.6.10
- name: Run every test file, under coverage
run: |
python -m coverage erase
status=0
while IFS= read -r file; do
echo "::group::${file}"
python -m coverage run -a "${file}" || status=1
echo "::endgroup::"
done < <(find snesdsp conformance -name '*.test.py' | sort)
exit "${status}"
shell: bash
- name: Coverage must be total
run: python -m coverage report
firmware:
name: Against the microcode, when any is present
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
submodules: recursive
- uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}
# These checks exist and are meant to be seen. They run the program the
# cartridge carries, which belongs to whoever wrote it, so on a machine
# without one every check reports as skipped rather than as passed.
- name: Run the microcode itself
run: |
python conformance/against_firmware.py | tee report.txt
python conformance/against_firmware.test.py -v 2>&1 | tee -a report.txt
python conformance/against_part.py 2>&1 | tee -a report.txt
shell: bash
- name: Say what ran and what could not
run: |
if grep -q "skipped" report.txt; then
echo "::notice title=Microcode checks skipped::No firmware image was present, so the checks that run the microcode itself did not run. They are not failures; they had nothing to run against."
fi
shell: bash