-
Notifications
You must be signed in to change notification settings - Fork 3
40 lines (30 loc) · 1.11 KB
/
pysjtu.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
name: PySJTU Tests
on: [ push, pull_request ]
jobs:
test:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
python: [ "3.9", "3.10", "3.11", "3.12" ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: pdm-project/setup-pdm@v3
name: Setup PDM and Python ${{ matrix.python }}
with:
python-version: ${{ matrix.python }}
cache: true
version: 2.15.4
- name: Install dependencies
run: pdm sync -G tests -G ocr
- name: Test if no syntax error
run: pdm run flake8 . --exclude .venv --count --select=E9,F63,F7,F82 --show-source --statistics
- name: Test with pytest
run: pdm run pytest --cov-report xml --cov=pysjtu
- name: Upload coverage
if: matrix.os == 'ubuntu-latest' && matrix.python == '3.12' && github.repository == 'PhotonQuantum/pysjtu'
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_COVERAGE_TOKEN }}
coverage-reports: coverage.xml
language: Python