diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..27dbffd --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,45 @@ +name: CI + +on: [push, pull_request, workflow_dispatch] + +permissions: + contents: "read" + +defaults: + run: + shell: bash +env: + FORCE_COLOR: 1 + +jobs: + tests: + strategy: + fail-fast: false + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] + os: ["ubuntu-24.04"] + include: + # Homebrew + - python-version: "3.14" + os: "macos-15" + + runs-on: ${{ matrix.os }} + name: ${{ fromJson('{"macos-15":"macOS","windows-latest":"Windows","ubuntu-24.04":"Ubuntu"}')[matrix.os] }} ${{ matrix.python-version }} + timeout-minutes: 10 + steps: + - name: "Checkout repository" + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + with: + persist-credentials: false + + - name: "Setup Python ${{ matrix.python-version }}" + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 + with: + python-version: ${{ matrix.python-version }} + allow-prereleases: true + check-latest: true + + - name: "Run tests" + run: | + python -m pip install nox + nox -s "tests-${{ matrix.python-version }}" diff --git a/noxfile.py b/noxfile.py index 964f77a..b93eae9 100644 --- a/noxfile.py +++ b/noxfile.py @@ -1,7 +1,7 @@ import nox -@nox.session(python=["3.9", "3.10", "3.11", "3.12", "3.13"]) +@nox.session(python=["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]) def tests(session): session.install("-e.", "pytest") session.run("pytest", *session.posargs)