diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..e628afa --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,34 @@ +name: Run tests + +on: + pull_request: + push: + branches: + - master + +jobs: + nox: + name: Nox + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - "3.7" + - "3.8" + - "3.9" + - "3.10" + - "3.11" + - "3.12.0-alpha - 3.12" + - "pypy-3.9" + steps: + - uses: actions/checkout@v3 + - uses: excitedleigh/setup-nox@v2.1.0 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Run tests + run: | + v="${{ matrix.python-version }}" + v=${v##* } # "3.12.0-alpha - 3.12" -> "3.12" + v=${v//-} # "pypy-3.9" -> "pypy3.9" + nox --force-color --python "$v"