Skip to content

simpl workflow

simpl workflow #466

name: Tests & Coverage
on:
push:
branches:
- '**'
- '!master' # excludes master
tags-ignore:
- '*.*'
pull_request: {}
jobs:
build:
name: Test (${{ matrix.python-version }}, ${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ 'macos-latest', 'windows-latest' ]
python-version: ["3.12", "3.11", "3.10", "3.9", "3.8"]
include:
- os: ubuntu-latest
python-version: "3.8"
codecov: true
- os: ubuntu-latest
python-version: "3.9"
- os: ubuntu-latest
python-version: "3.10"
- os: ubuntu-latest
python-version: "3.11"
- os: ubuntu-latest
python-version: "3.12"
defaults:
run:
shell: bash
runs-on: ${{ matrix.os }}
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
- name: ⬇️ Checkout
uses: actions/checkout@v3
- name: Setup PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: ${{ matrix.python-version }}
- name: 🔩 Install with pdm
run: pdm install --no-editable -G:all -G tests # pdm install -G:all
- name: 🔎 pdm run python run_test.py
run: pdm run python run_test.py
- name: 🔼 Upload coverage to Codecov
if: (matrix.codecov)
uses: codecov/codecov-action@v1.0.13
with:
file: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: true