Skip to content

Commit

Permalink
ci: update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
PhotonQuantum committed Jun 4, 2024
1 parent ce357c6 commit 45c3c06
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build_n_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
- uses: actions/checkout@v3

- uses: pdm-project/setup-pdm@v3
name: Setup PDM and Python 3.10
name: Setup PDM and Python 3.12
with:
python-version: "3.10"
python-version: "3.12"
cache: true
version: 2.7.0
version: 2.15.4

- name: Install dependencies
run: pdm sync -G tests -G ocr
Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/pysjtu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
python: [ "3.8", "3.9", "3.10", "3.11" ]
python: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]

runs-on: ${{ matrix.os }}

Expand All @@ -20,24 +20,19 @@ jobs:
with:
python-version: ${{ matrix.python }}
cache: true
version: 2.7.0
version: 2.15.4

- name: Install dependencies
if: ${{ matrix.python != '3.11' }}
run: pdm sync -G tests -G ocr

- name: Install dependencies
if: ${{ matrix.python == '3.11' }}
run: pdm sync -G tests

- 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.8' && github.repository == 'PhotonQuantum/pysjtu'
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 }}
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ dev = [
]

[build-system]
requires = ["pdm-pep517>=1.0"]
build-backend = "pdm.pep517.api"
requires = ["pdm-backend"]
build-backend = "pdm.backend"

0 comments on commit 45c3c06

Please sign in to comment.