From 8e6a070509ac0d82cc9a6a17cf580cade75d4771 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez=20Mondrag=C3=B3n?= <16805946+edgarrmondragon@users.noreply.github.com> Date: Tue, 21 Nov 2023 13:39:01 -0600 Subject: [PATCH] ci: Use Python 3.11 as the default Python version in CI jobs (#2062) --- .github/ISSUE_TEMPLATE/bug.yml | 1 + .github/workflows/codspeed.yml | 2 +- .github/workflows/cookiecutter-e2e.yml | 14 ++++++++++---- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 14 ++++++++------ .github/workflows/version_bump.yml | 2 +- noxfile.py | 2 +- 7 files changed, 23 insertions(+), 14 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index af5c7ee5e..f6cf3f8a7 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -36,6 +36,7 @@ body: - "3.8" - "3.9" - "3.10" + - "3.11" - "NA" validations: required: true diff --git a/.github/workflows/codspeed.yml b/.github/workflows/codspeed.yml index 5749ceef8..e41b0b51b 100644 --- a/.github/workflows/codspeed.yml +++ b/.github/workflows/codspeed.yml @@ -16,7 +16,7 @@ jobs: - name: Check out the repository uses: actions/checkout@v4.1.1 - - name: Setup Python 3.11 + - name: Setup Python uses: actions/setup-python@v4.7.1 with: python-version: 3.11 diff --git a/.github/workflows/cookiecutter-e2e.yml b/.github/workflows/cookiecutter-e2e.yml index b36df1fa4..0df1fa2d8 100644 --- a/.github/workflows/cookiecutter-e2e.yml +++ b/.github/workflows/cookiecutter-e2e.yml @@ -3,10 +3,16 @@ name: E2E Cookiecutters on: pull_request: types: [opened, synchronize, reopened] - paths: ["cookiecutter/**", "e2e-tests/cookiecutters/**"] + paths: + - "cookiecutter/**" + - "e2e-tests/cookiecutters/**" + - ".github/workflows/cookiecutter-e2e.yml" push: branches: [main] - paths: ["cookiecutter/**", "e2e-tests/cookiecutters/**"] + paths: + - "cookiecutter/**" + - "e2e-tests/cookiecutters/**" + - ".github/workflows/cookiecutter-e2e.yml" workflow_dispatch: concurrency: @@ -18,13 +24,13 @@ env: jobs: lint: - name: Cookiecutter E2E ${{ matrix.python-version }} ${{ matrix.python-version }} / ${{ matrix.os }} + name: Cookiecutter E2E Python ${{ matrix.python-version }} / ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: fail-fast: true matrix: include: - - { python-version: "3.10", os: "ubuntu-latest" } + - { python-version: "3.11", os: "ubuntu-latest" } steps: - name: Check out the repository diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e2f1f460a..e1f42fd10 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4.7.1 with: - python-version: "3.10" + python-version: "3.11" - name: Upgrade pip env: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7077ba5be..84306c910 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -50,8 +50,8 @@ jobs: sqlalchemy: ["2.*"] include: - { session: tests, python-version: "3.11", os: "ubuntu-latest", sqlalchemy: "1.*" } - - { session: doctest, python-version: "3.10", os: "ubuntu-latest", sqlalchemy: "2.*" } - - { session: mypy, python-version: "3.8", os: "ubuntu-latest", sqlalchemy: "2.*" } + - { session: doctest, python-version: "3.11", os: "ubuntu-latest", sqlalchemy: "2.*" } + - { session: mypy, python-version: "3.11", os: "ubuntu-latest", sqlalchemy: "2.*" } steps: - name: Check out the repository @@ -107,6 +107,8 @@ jobs: runs-on: ubuntu-latest if: ${{ !github.event.pull_request.head.repo.fork }} env: + NOXPYTHON: "3.11" + NOXSESSION: tests SAMPLE_TAP_GITLAB_AUTH_TOKEN: ${{ secrets.SAMPLE_TAP_GITLAB_AUTH_TOKEN }} SAMPLE_TAP_GITLAB_GROUP_IDS: ${{ secrets.SAMPLE_TAP_GITLAB_GROUP_IDS }} SAMPLE_TAP_GITLAB_PROJECT_IDS: ${{ secrets.SAMPLE_TAP_GITLAB_PROJECT_IDS }} @@ -128,10 +130,10 @@ jobs: poetry --version poetry self show plugins - - name: Setup Python 3.10 + - name: Setup Python uses: actions/setup-python@v4.7.1 with: - python-version: '3.10' + python-version: ${{ env.NOXPYTHON }} architecture: x64 cache: 'pip' cache-dependency-path: 'poetry.lock' @@ -153,7 +155,7 @@ jobs: - name: Run Nox run: | - nox -s tests -p 3.10 -- -m "external" + nox -- -m "external" coverage: name: Coverage @@ -175,7 +177,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4.7.1 with: - python-version: '3.10' + python-version: '3.11' cache: 'pip' cache-dependency-path: 'poetry.lock' diff --git a/.github/workflows/version_bump.yml b/.github/workflows/version_bump.yml index ad8ff0913..0ba2e9044 100644 --- a/.github/workflows/version_bump.yml +++ b/.github/workflows/version_bump.yml @@ -42,7 +42,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4.7.1 with: - python-version: "3.10" + python-version: "3.11" architecture: x64 - name: Bump version diff --git a/noxfile.py b/noxfile.py index 0881ba3ff..1a98cf853 100644 --- a/noxfile.py +++ b/noxfile.py @@ -29,7 +29,7 @@ package = "singer_sdk" python_versions = ["3.11", "3.10", "3.9", "3.8", "3.7"] -main_python_version = "3.10" +main_python_version = "3.11" locations = "singer_sdk", "tests", "noxfile.py", "docs/conf.py" nox.options.sessions = ( "mypy",