Skip to content

Python application #1345

Python application

Python application #1345

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint using pixi
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python application
on:
push:
branches:
- master
pull_request:
schedule:
- cron: '0 12 * * *'
jobs:
test:
name: Run tests on Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- python-version: "py38"
os: ubuntu-latest
- python-version: "py39"
os: ubuntu-latest
- python-version: "py310"
os: ubuntu-latest
- python-version: "py311"
os: ubuntu-latest
- python-version: "py312"
os: ubuntu-latest
- python-version: "py313"
os: ubuntu-latest
- python-version: "py314"
os: ubuntu-latest
# Test on additional platforms for Python 3.11
- python-version: "py311"
os: macos-latest
- python-version: "py311"
os: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup pixi
uses: prefix-dev/[email protected]
with:
pixi-version: v0.55.0
cache: true
- name: Install dependencies and run tests
run: pixi run test-${{ matrix.python-version }}
- name: Run lint (Python 3.11 only)
if: matrix.python-version == 'py311' && matrix.os == 'ubuntu-latest'
run: pixi run lint
- name: Generate coverage report (Python 3.11 only)
if: matrix.python-version == 'py311' && matrix.os == 'ubuntu-latest'
run: pixi run -e py311 coverage && pixi run -e py311 coverage-combine && pixi run -e py311 coverage-xml
- name: Publish to codecov
if: matrix.python-version == 'py311' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v4