Skip to content

Commit

Permalink
[DOP-11096] Update CI to run mostly on Python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
dolfinus committed Dec 19, 2023
1 parent a2a71bc commit bdb1691
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- master

env:
DEFAULT_PYTHON: '3.11'
DEFAULT_PYTHON: '3.12'

permissions:
contents: read
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

env:
# flake8-commas is failing on Python 3.12
DEFAULT_PYTHON: '3.11'

jobs:
linters:
name: Linters
Expand All @@ -26,19 +30,19 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Python 3.11
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: ${{ env.DEFAULT_PYTHON }}

- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-python-3.11-codeql-${{ hashFiles('requirements*.txt') }}
key: ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-codeql-${{ hashFiles('requirements*.txt') }}
restore-keys: |
${{ runner.os }}-python-3.11-codeql-${{ hashFiles('requirements*.txt') }}
${{ runner.os }}-python-3.11-codeql-
${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-codeql-${{ hashFiles('requirements*.txt') }}
${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-codeql-
${{ runner.os }}-python
${{ runner.os }}-
Expand Down Expand Up @@ -71,10 +75,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Python 3.11
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: ${{ env.DEFAULT_PYTHON }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dev-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
workflow_dispatch:

env:
DEFAULT_PYTHON: '3.11'
DEFAULT_PYTHON: '3.12'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- '[0-9]+.[0-9]+.[0-9]+'

env:
DEFAULT_PYTHON: '3.11'
DEFAULT_PYTHON: '3.12'

jobs:
release:
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

env:
DEFAULT_PYTHON: '3.12'

jobs:
tests:
name: Run tests (${{ matrix.python-version }} on ${{ matrix.os }})
Expand Down Expand Up @@ -76,19 +79,19 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python 3.11
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: ${{ env.DEFAULT_PYTHON }}

- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-python-3.11-coverage-${{ hashFiles('requirements*.txt') }}
key: ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-coverage-${{ hashFiles('requirements*.txt') }}
restore-keys: |
${{ runner.os }}-python-3.11-coverage-${{ hashFiles('requirements*.txt') }}
${{ runner.os }}-python-3.11-coverage-
${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-coverage-${{ hashFiles('requirements*.txt') }}
${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-coverage-
${{ runner.os }}-python
${{ runner.os }}-
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: '3.11'
python: '3.12'

python:
install:
Expand Down

0 comments on commit bdb1691

Please sign in to comment.