chore: update dependencies #123
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |