-
Notifications
You must be signed in to change notification settings - Fork 723
64 lines (55 loc) · 1.9 KB
/
python-app.yml
File metadata and controls
64 lines (55 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# 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/setup-pixi@v0.8.1
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