Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shrink CI matrix #383

Merged
merged 2 commits into from
Apr 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 62 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:
tox: build

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up ${{ matrix.python.name }}
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python.action }}

Expand All @@ -46,26 +46,19 @@ jobs:
run: tox -c tox.ini -e ${{ matrix.task.tox }}

- name: Publish
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: dist
path: dist/

test:
name: ${{ matrix.task.name}} - ${{ matrix.os.name }} ${{ matrix.python.name }}
runs-on: ${{ matrix.os.runs-on }}
test-linux:
name: ${{ matrix.task.name}} - Linux ${{ matrix.python.name }}
runs-on: ubuntu-latest
needs:
- build
strategy:
fail-fast: false
matrix:
os:
- name: Linux
runs-on: ubuntu-latest
- name: macOS
runs-on: macos-latest
- name: Win
runs-on: windows-latest
python:
- name: CPython 3.7
tox: py37
Expand All @@ -90,16 +83,59 @@ jobs:
tox: tests

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Download package files
uses: actions/download-artifact@v3
with:
name: dist
path: dist/

- name: Set up ${{ matrix.python.name }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python.action }}

- name: Install dependencies
run: python -m pip install --upgrade pip tox codecov

- uses: twisted/python-info-action@v1

- name: Tox
run: tox -c tox.ini --installpkg dist/*.whl -e ${{ matrix.python.tox }}-tests

- name: Codecov
run: |
codecov -n "GitHub Actions - ${{ matrix.task.name}} - ${{ matrix.os.name }} ${{ matrix.python.name }}"


test-windows:
name: ${{ matrix.task.name}} - Windows ${{ matrix.python.name }}
runs-on: windows-latest
needs:
- build
strategy:
fail-fast: false
matrix:
python:
- name: CPython 3.9
tox: py39
action: '3.9'
task:
- name: Test
tox: tests

steps:
- uses: actions/checkout@v3

- name: Download package files
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: dist
path: dist/

- name: Set up ${{ matrix.python.name }}
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python.action }}

Expand Down Expand Up @@ -134,18 +170,18 @@ jobs:
tox: check-newsfragment

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Download package files
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: dist
path: dist/

- name: Set up ${{ matrix.python.name }}
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python.action }}

Expand All @@ -164,18 +200,19 @@ jobs:

needs:
- build
- test
- test-linux
- test-windows
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Download package files
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: dist
path: dist/

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: 3.9

Expand Down Expand Up @@ -203,7 +240,8 @@ jobs:
runs-on: ubuntu-latest
needs:
- build
- test
- test-linux
- test-windows
- check
- pypi-publish
steps:
Expand Down
Empty file.