Challenge 1: Add a Python Version Matrix — Possible Solution ==================================================================== jobs: test: strategy: matrix: python-version: ['3.10', '3.11', '3.12'] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - run: pip install -r requirements.txt - run: pytest WHY THIS WORKS -------------- - The strategy: matrix: block follows the exact same structure as this chapter's own Node.js example — just with python-version as the matrix key instead of node-version, and the three version numbers (3.10, 3.11, 3.12) listed as this challenge specifies. - Each version is quoted as a STRING ('3.10' rather than 3.10) — this is a genuinely important YAML detail for version numbers like this: unquoted, 3.10 could be interpreted as the number 3.1 (YAML parsers can treat trailing zeros in a decimal as insignificant), silently dropping the distinction between 3.10 and 3.1. Quoting forces it to be treated as literal text, avoiding that specific parsing trap. - ${{ matrix.python-version }} is used inside actions/setup-python's with: block, exactly mirroring how this chapter's example used ${{ matrix.node-version }} inside actions/setup-node — this is the templating syntax that lets GitHub Actions substitute in whichever specific version this particular parallel job run is handling. - This produces exactly three parallel jobs — one for each Python version — just as the chapter's own three-Node-version example produced three parallel jobs, catching any "works on 3.12 but breaks on 3.10" compatibility bug before it reaches real users, rather than only testing whichever single version happens to be installed on a developer's own machine.