From beca85db3b8a2dd50e17b17b03ecc895f84e2088 Mon Sep 17 00:00:00 2001 From: Claudio Usai Date: Sat, 18 Apr 2026 01:11:56 +0200 Subject: [PATCH] actions: update actions to latest and pdm version --- .github/workflows/pylint.yml | 51 ++++++++++++++--------------- .github/workflows/pytest.yml | 61 +++++++++++++++++------------------ .github/workflows/release.yml | 8 ++--- 3 files changed, 55 insertions(+), 65 deletions(-) diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 23fb41f..674aa6a 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -5,15 +5,13 @@ permissions: on: push: branches: - - "main" + - "main" pull_request: branches: - - "main" + - "main" jobs: - lint: - strategy: matrix: python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"] @@ -21,26 +19,25 @@ jobs: runs-on: ubuntu-latest steps: - - - uses: actions/checkout@v4 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Setup PDM - uses: pdm-project/setup-pdm@v4.4 - with: - python-version: ${{ matrix.python-version }} - # The target architecture (x86, x64) of the Python interpreter. - # architecture: # optional - version: 2.26.3 - cache: true - cache-dependency-path: ./py${{ matrix.python-version }}.lock - - - name: Install dependencies - run: pdm install --frozen-lockfile -L ./py${{ matrix.python-version }}.lock - - - name: Analyzing the code with pylint - run: pdm run pylint src + - uses: actions/checkout@v6 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v6 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup PDM + uses: pdm-project/setup-pdm@v4.4 + with: + python-version: ${{ matrix.python-version }} + # The target architecture (x86, x64) of the Python interpreter. + # architecture: # optional + version: 2.26.7 + cache: true + cache-dependency-path: ./py${{ matrix.python-version }}.lock + + - name: Install dependencies + run: pdm install --frozen-lockfile -L ./py${{ matrix.python-version }}.lock + + - name: Analyzing the code with pylint + run: pdm run pylint src diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index f00a13a..6ee5e71 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -5,15 +5,13 @@ permissions: on: push: branches: - - "main" + - "main" pull_request: branches: - - "main" + - "main" jobs: - test: - strategy: fail-fast: false matrix: @@ -23,31 +21,30 @@ jobs: runs-on: ${{ matrix.os }} steps: - - - uses: actions/checkout@v4 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Setup PDM - uses: pdm-project/setup-pdm@v4.4 - with: - python-version: ${{ matrix.python-version }} - # The target architecture (x86, x64) of the Python interpreter. - # architecture: # optional - version: 2.26.3 - cache: true - cache-dependency-path: ./py${{ matrix.python-version }}.lock - - - name: Install dependencies - run: pdm install --frozen-lockfile -L ./py${{ matrix.python-version }}.lock - - - name: Test with pytest - run: pdm run pytest --timeout=90 - - - name: Upload code coverage to Codecov - uses: codecov/codecov-action@v4 - with: - token: ${{ secrets.CODECOV_TOKEN }} + - uses: actions/checkout@v6 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v6 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup PDM + uses: pdm-project/setup-pdm@v4.4 + with: + python-version: ${{ matrix.python-version }} + # The target architecture (x86, x64) of the Python interpreter. + # architecture: # optional + version: 2.26.7 + cache: true + cache-dependency-path: ./py${{ matrix.python-version }}.lock + + - name: Install dependencies + run: pdm install --frozen-lockfile -L ./py${{ matrix.python-version }}.lock + + - name: Test with pytest + run: pdm run pytest --timeout=90 + + - name: Upload code coverage to Codecov + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1138346..a949d8f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,11 +7,8 @@ on: tags: - "v*" - jobs: - publish-to-pypi: - name: Publish distribution to PyPI runs-on: ubuntu-latest permissions: @@ -20,15 +17,14 @@ jobs: # IMPORTANT: this permission is mandatory for trusted publishing id-token: write steps: - - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Setup PDM uses: pdm-project/setup-pdm@v4.4 with: # The target architecture (x86, x64) of the Python interpreter. # architecture: # optional - version: 2.26.3 + version: 2.26.7 cache: true - name: Publish package distributions to PyPI