From 45c3c06d67bf6c3e58bdf32a6c307b3dc5ede4eb Mon Sep 17 00:00:00 2001 From: LightQuantum Date: Tue, 4 Jun 2024 20:23:16 +0800 Subject: [PATCH] ci: update CI --- .github/workflows/build_n_publish.yml | 6 +++--- .github/workflows/pysjtu.yml | 11 +++-------- pyproject.toml | 4 ++-- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build_n_publish.yml b/.github/workflows/build_n_publish.yml index abbb012..ab8a6a4 100644 --- a/.github/workflows/build_n_publish.yml +++ b/.github/workflows/build_n_publish.yml @@ -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 diff --git a/.github/workflows/pysjtu.yml b/.github/workflows/pysjtu.yml index b77ec5f..02ebfc5 100644 --- a/.github/workflows/pysjtu.yml +++ b/.github/workflows/pysjtu.yml @@ -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 }} @@ -20,16 +20,11 @@ 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 @@ -37,7 +32,7 @@ jobs: 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 }} diff --git a/pyproject.toml b/pyproject.toml index 63f52ff..a715387 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,5 +57,5 @@ dev = [ ] [build-system] -requires = ["pdm-pep517>=1.0"] -build-backend = "pdm.pep517.api" +requires = ["pdm-backend"] +build-backend = "pdm.backend"