Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 1.21 KB

python-3-11.md

File metadata and controls

33 lines (24 loc) · 1.21 KB

Testing against Python 3.11 preview using GitHub Actions

I decided to run my CI tests against the Python 3.11 preview, to avoid the problem I had when Python 3.10 came out with a bug that affected Datasette.

I used the new GitHub Code Search to figure out how to do this. I searched for:

3.11 path:workflows/*.yml

And found this example from urllib3 which showed that the version tag to use is:

3.11-dev

Update 28th Noveber 2022: 3.12-dev now works for Python 3.12 preview

I added that to my test matrix like so:

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ["3.7", "3.8", "3.9", "3.10", "3.11-dev"]
    steps:
    - uses: actions/checkout@v2
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python-version }}
    # ...

Here's the full workflow.