Skip to content

Commit

Permalink
Tidy up Python versions (#840)
Browse files Browse the repository at this point in the history
* Tidy up Python versions

* Add comment
  • Loading branch information
bhrutledge authored Nov 28, 2021
1 parent 4016a6b commit 1b9f1cd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Run integration tests separately from main.yml because they can be flaky
# See https://github.com/pypa/twine/issues/684#issuecomment-703150619
name: Integration

on:
Expand All @@ -7,14 +9,19 @@ on:
schedule:
- cron: '0 0 * * *' # daily

env:
FORCE_COLOR: "1"
TOX_TESTENV_PASSENV: "FORCE_COLOR"
MIN_PYTHON_VERSION: "3.6"

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: ${{ env.MIN_PYTHON_VERSION }}
- name: Install dependencies
run: python -m pip install tox
- name: Run tests
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
env:
FORCE_COLOR: "1"
TOX_TESTENV_PASSENV: "FORCE_COLOR"
MIN_PYTHON_VERSION: "3.6"
DEFAULT_PYTHON_VERSION: "3.9"

jobs:
lint:
Expand All @@ -17,7 +19,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.8"
python-version: ${{ env.DEFAULT_PYTHON_VERSION }}
- name: Install dependencies
run: python -m pip install tox
- name: Run linting
Expand All @@ -26,7 +28,7 @@ jobs:
test:
strategy:
matrix:
python:
python-version:
- "3.6"
- "3.7"
- "3.8"
Expand All @@ -41,7 +43,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: python -m pip install tox
- name: Run type-checking
Expand All @@ -52,7 +54,7 @@ jobs:
if: github.event_name != 'schedule'
with:
file: ./coverage.xml
name: ${{ matrix.python }} - ${{ matrix.platform }}
name: ${{ matrix.python-version }} - ${{ matrix.platform }}
fail_ci_if_error: true

docs:
Expand All @@ -61,8 +63,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
# Mininum supported Python version
python-version: "3.6"
python-version: ${{ env.MIN_PYTHON_VERSION }}
- name: Install dependencies
run: python -m pip install tox
- name: Build docs
Expand All @@ -79,7 +80,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.8"
python-version: ${{ env.MIN_PYTHON_VERSION }}
- name: Install dependencies
run: python -m pip install tox
- name: Release
Expand Down

0 comments on commit 1b9f1cd

Please sign in to comment.