From ee84506be1b82376071e7f2ebf7536024380f1fd Mon Sep 17 00:00:00 2001 From: ghazi Date: Wed, 3 Dec 2025 06:07:31 +0100 Subject: [PATCH 1/2] avoid duplicate test runs in PRs --- .github/workflows/coverage.yml | 6 ++++-- .github/workflows/tests.yml | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 674ee80..ba0c4ec 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -1,8 +1,10 @@ name: Coverage on: - - push - - pull_request + push: + branches: [main] + pull_request: + types: [opened, synchronize] jobs: run: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 01b204b..6372333 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,8 +1,10 @@ name: Tests on: - - push - - pull_request + push: + branches: [main] + pull_request: + types: [opened, synchronize] jobs: test: From ad633a042b67fd2f16c896223c2e1fc0ed07e3e0 Mon Sep 17 00:00:00 2001 From: ghazi Date: Wed, 3 Dec 2025 06:15:18 +0100 Subject: [PATCH 2/2] update actions versions --- .github/workflows/coverage.yml | 8 ++++---- .github/workflows/github_release.yml | 2 +- .github/workflows/tests.yml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index ba0c4ec..1d74013 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -10,15 +10,15 @@ jobs: run: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Setup Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: - python-version: 3.8 + python-version: 3.12 - name: Generate coverage report run: | pip install . - pip install django~=3.2 pytest pytest-django pytest-cov drf-spectacular django-filter + pip install django~=5.2 pytest pytest-django pytest-cov drf-spectacular django-filter pytest --cov --cov-report=xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 diff --git a/.github/workflows/github_release.yml b/.github/workflows/github_release.yml index 815c571..45179f7 100644 --- a/.github/workflows/github_release.yml +++ b/.github/workflows/github_release.yml @@ -19,7 +19,7 @@ jobs: echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v} shell: bash - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Get Changelog Entry id: changelog_reader uses: mindsers/changelog-reader-action@v2 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6372333..a1cb176 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,9 +15,9 @@ jobs: python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13" ] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - name: Install dependencies