Reduce CI matrix (#1149)

This commit is contained in:
Hynek Schlawack 2023-06-14 16:52:17 +02:00 committed by GitHub
parent 3ec01cae97
commit f93e0663e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 38 deletions

View File

@ -21,7 +21,7 @@ permissions:
jobs: jobs:
tests: tests:
name: Tests on ${{ matrix.python-version }} name: Tests & Mypy on ${{ matrix.python-version }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
@ -46,7 +46,7 @@ jobs:
allow-prereleases: true allow-prereleases: true
cache: pip cache: pip
- name: Prepare & run tox - name: Prepare tox & run tests
run: | run: |
V=${{ matrix.python-version }} V=${{ matrix.python-version }}
@ -58,6 +58,8 @@ jobs:
python -Im pip install tox python -Im pip install tox
python -Im tox run -f $V python -Im tox run -f $V
- run: python -Im tox run -e mypy
if: ${{ !startsWith(matrix.python-version, 'pypy-') }}
- name: Upload coverage data - name: Upload coverage data
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
@ -77,8 +79,6 @@ jobs:
python-version-file: .python-version-default python-version-file: .python-version-default
cache: pip cache: pip
- run: python -Im pip install --upgrade coverage[toml]
- name: Download coverage data - name: Download coverage data
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
with: with:
@ -86,6 +86,8 @@ jobs:
- name: Combine coverage and fail if it's <100%. - name: Combine coverage and fail if it's <100%.
run: | run: |
python -Im pip install --upgrade coverage[toml]
python -Im coverage combine python -Im coverage combine
python -Im coverage html --skip-covered --skip-empty python -Im coverage html --skip-covered --skip-empty
python -Im coverage report --fail-under=100 python -Im coverage report --fail-under=100
@ -108,34 +110,10 @@ jobs:
python-version: "3.11" python-version: "3.11"
cache: pip cache: pip
- run: python -Im pip install --upgrade tox - name: Prepare & run tox
run: |
- run: python -Im tox run -e docs,changelog python -Im pip install tox
python -Im tox run -e docs,changelog
mypy:
name: Mypy on ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
cache: pip
- run: python -Im pip install --upgrade tox
- run: python -Im tox run -e mypy
pyright: pyright:
name: Check types using pyright name: Check types using pyright
@ -147,8 +125,10 @@ jobs:
python-version-file: .python-version-default python-version-file: .python-version-default
cache: pip cache: pip
- run: python -Im pip install --upgrade tox - name: Prepare & run tox
- run: python -Im tox run -e pyright run: |
python -Im pip install tox
python -Im tox run -e pyright
install-dev: install-dev:
name: Verify dev env name: Verify dev env
@ -164,9 +144,11 @@ jobs:
python-version-file: .python-version-default python-version-file: .python-version-default
cache: pip cache: pip
- run: python -Im pip install -e .[dev] - name: Install in dev mode & import
- run: python -Ic 'import attr; print(attr.__version__)' run: |
- run: python -Ic 'import attrs; print(attrs.__version__)' python -Im pip install -e .[dev]
python -Ic 'import attr; print(attr.__version__)'
python -Ic 'import attrs; print(attrs.__version__)'
# Ensure everything required is passing for branch protection. # Ensure everything required is passing for branch protection.
required-checks-pass: required-checks-pass:
@ -176,7 +158,6 @@ jobs:
- coverage - coverage
- docs - docs
- install-dev - install-dev
- mypy
# Pyright is currently flaky # Pyright is currently flaky
# XXX: https://github.com/ekalinin/nodeenv/issues/324 # XXX: https://github.com/ekalinin/nodeenv/issues/324
# - pyright # - pyright