Skip to content

ci: switch to ubuntu-latest & revised matrixes #50

ci: switch to ubuntu-latest & revised matrixes

ci: switch to ubuntu-latest & revised matrixes #50

Workflow file for this run

# Runs tests via tox
# Runs on pull requests to main/master
# Full Python matrix runs on push to main/master
name: Test
on:
pull_request:
branches:
- main
- master
push:
branches:
- main
- master
jobs:
pr:
# Pull requests: fast feedback on latest Python only
name: PR (Python 3.12)
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
python-version:
- "3.12"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Set up Python ${{ matrix.python-version }}"
uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python-version }}"
- name: Install build meta-dependencies
run: |
pip install tox poetry tox-gh-actions
- name: Test with tox
run: |
tox
# - name: Coveralls Python
# uses: AndreMiras/coveralls-python-action@v20201129
# with:
# #github-token: #${{ secrets.GITHUB_TOKEN }}
# github-token: ${{ secrets.COVERALLS_REPO_TOKEN }}
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true # optional (default = false)
main:
# Pushes to main/master: full Python matrix
name: Main/Master (Python matrix)
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
python-version:
- "3.10"
- "3.11"
- "3.12"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Set up Python ${{ matrix.python-version }}"
uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python-version }}"
- name: Install build meta-dependencies
run: |
pip install tox poetry tox-gh-actions
- name: Test with tox
run: |
tox
# - name: Coveralls Python
# uses: AndreMiras/coveralls-python-action@v20201129
# with:
# #github-token: #${{ secrets.GITHUB_TOKEN }}
# github-token: ${{ secrets.COVERALLS_REPO_TOKEN }}
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true # optional (default = false)