Skip to content

Commit

Permalink
Pin CI to Python 3.11 (#583)
Browse files Browse the repository at this point in the history
* Inline the python-poetry-ci workflow

This didn't have a way to pin the Python version in use. We haven't
found pulling this out to be useful, so instead let's just inline it.

* Test on 3.11

* Pin checks to Python 3.11

* Changelog
  • Loading branch information
David Robertson authored Nov 20, 2023
1 parent a6f338d commit 1264936
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
35 changes: 32 additions & 3 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,41 @@ jobs:
ref: ${{github.event.pull_request.head.sha}}
- uses: actions/setup-python@v2
with:
python-version: "3.7"
python-version: "3.11"
- run: python -m pip install towncrier
- run: "scripts-dev/check_newsfragment.sh ${{ github.event.number }}"

checks:
uses: "matrix-org/backend-meta/.github/workflows/python-poetry-ci.yml@v2"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: matrix-org/setup-python-poetry@v1
with:
python-version: 3.11
install-project: false

- name: Import order (isort)
run: poetry run isort --check --diff .

- name: Code style (black)
run: poetry run black --check --diff .

- name: Semantic checks (ruff)
# --quiet suppresses the update check.
run: poetry run ruff --quiet .

- name: Restore/persist mypy's cache
uses: actions/cache@v3
with:
path: |
.mypy_cache
key: mypy-cache-${{ github.context.sha }}
restore-keys: mypy-cache-

- name: Typechecking (mypy)
run: poetry run mypy

packaging:
uses: "matrix-org/backend-meta/.github/workflows/packaging.yml@v1"

Expand All @@ -37,7 +66,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.x']
python-version: ['3.7', '3.11']
test-dir: ['tests', 'matrix_is_tester']

steps:
Expand Down
1 change: 1 addition & 0 deletions changelog.d/583.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Pin CI to Python 3.11.

0 comments on commit 1264936

Please sign in to comment.