-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (43 loc) · 1.16 KB
/
ci.yml
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
name: CI
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: ${{ matrix.python-version }}
cache: true
- name: Install dependencies
run: |
pdm sync --no-editable
- name: Run static code analysis
run: |
pdm lint
- name: Run Tests
run: |
pdm test --junit-xml=test-results.xml --cov-report xml:coverage.xml | tee pytest-coverage.txt
- name: Publish tests result
if: always()
uses: pmeier/pytest-results-action@main
with:
path: test-results.xml
summary: true
fail-on-empty: true
# (Optional) Title of the test results section in the workflow summary
title: Tests result - ${{ matrix.python-version }}
name: Code Coverage Summary Report
- name: Pubish code coverage
if: always()
uses: irongut/[email protected]
with:
filename: coverage.xml