Skip to content
This repository has been archived by the owner on Sep 22, 2023. It is now read-only.

Commit

Permalink
setup,ci: Include Python 3.10 in CI (#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
achimnol committed Mar 14, 2022
1 parent 899f588 commit 46c4f30
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 57 deletions.
72 changes: 28 additions & 44 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,22 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9"]
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip packages
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: lint-flake8-${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py') }}
restore-keys: |
lint-flake8-${{ runner.os }}-pip-${{ matrix.python-version }}
lint-flake8-${{ runner.os }}-pip-
cache: "pip"
cache-dependency-path: |
setup.py
requirements/lint.txt
- name: Install dependencies
env:
REQUIREMENTS_FILE: lint
run: |
python -m pip install -U pip setuptools
python -m pip install -U pip setuptools wheel
if [ -n "$GITHUB_HEAD_REF" ]; then
export GHBRANCH="${GITHUB_HEAD_REF#refs/heads/}"
else
Expand All @@ -54,26 +50,22 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9"]
python-version: ["3.10"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip packages
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: typecheck-mypy-${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py') }}
restore-keys: |
typecheck-mypy-${{ runner.os }}-pip-${{ matrix.python-version }}
typecheck-mypy-${{ runner.os }}-pip-
cache: "pip"
cache-dependency-path: |
setup.py
requirements/typecheck.txt
- name: Install dependencies
env:
REQUIREMENTS_FILE: typecheck
run: |
python -m pip install -U pip setuptools
python -m pip install -U pip setuptools wheel
if [ -n "$GITHUB_HEAD_REF" ]; then
export GHBRANCH="${GITHUB_HEAD_REF#refs/heads/}"
else
Expand Down Expand Up @@ -101,26 +93,22 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9"]
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip packages
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: test-pytest-${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py') }}
restore-keys: |
test-pytest-${{ runner.os }}-pip-${{ matrix.python-version }}
test-pytest-${{ runner.os }}-pip-
cache: "pip"
cache-dependency-path: |
setup.py
requirements/test.txt
- name: Install dependencies
env:
REQUIREMENTS_FILE: test
run: |
python -m pip install -U pip setuptools
python -m pip install -U pip setuptools wheel
if [ -n "$GITHUB_HEAD_REF" ]; then
export GHBRANCH="${GITHUB_HEAD_REF#refs/heads/}"
else
Expand Down Expand Up @@ -159,22 +147,18 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Cache pip packages
uses: actions/cache@v2
uses: actions/setup-python@v3
with:
path: ~/.cache/pip
key: test-pytest-${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py') }}
restore-keys: |
test-pytest-${{ runner.os }}-pip-${{ matrix.python-version }}
test-pytest-${{ runner.os }}-pip-
python-version: "3.10"
cache: "pip"
cache-dependency-path: |
setup.py
requirements/build.txt
- name: Install dependencies
env:
REQUIREMENTS_FILE: build
run: |
python -m pip install -U pip setuptools
python -m pip install -U pip setuptools wheel
python -m pip install -U -r requirements/build.txt
- name: Build and publish
env:
Expand Down
21 changes: 8 additions & 13 deletions .github/workflows/timeline-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,17 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v2
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Cache pip packages
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: lint-towncrier-${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.cfg') }}
restore-keys: |
lint-towncrier-${{ runner.os }}-pip-${{ matrix.python-version }}
lint-towncrier-${{ runner.os }}-pip-
python-version: "3.10"
cache: "pip"
cache-dependency-path: |
requirements/timeline-check.txt
- name: Install dependencies
run: |
python -m pip install -U pip setuptools
python -m pip install -U -r requirements/build.txt
python -m pip install -U pip setuptools wheel
python -m pip install -U -r requirements/timeline-check.txt
- name: Check existence of news fragment
run: |
git fetch --no-tags origin +refs/heads/${BASE_BRANCH}:refs/remotes/origin/${BASE_BRANCH}
Expand Down
1 change: 1 addition & 0 deletions changes/210.misc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Include Python 3.10 in the CI and make it officially supported
1 change: 1 addition & 0 deletions requirements/timeline-check.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
towncrier~=21.9

0 comments on commit 46c4f30

Please sign in to comment.