From 81de18b4e3377679f3bbf0bf41905e0975f2209d Mon Sep 17 00:00:00 2001 From: Veerendra <8393701+veerendra2@users.noreply.github.com> Date: Wed, 1 Apr 2026 12:47:40 +0200 Subject: [PATCH 1/4] Fix CI --- .github/workflows/ci.yml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a47a49..77a3a85 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,12 +1,11 @@ --- -name: ci +name: CI on: - pull_request: - paths: - - "**/**" + pull_request_target: + types: [opened, synchronize, reopened] permissions: - contents: write + contents: read checks: write pull-requests: write @@ -57,16 +56,12 @@ jobs: - name: Install Dependencies run: | python -m pip install --upgrade pip - pip install flake8 pytest pytest-cov - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + pip install pytest pytest-cov + pip install -e . - name: Build coverage file run: | - pytest tests/ --cov=fitbit_cli --junitxml=/tmp/pytest.xml | tee /tmp/pytest-coverage.txt - - - name: Build coverage file - run: | - pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=app tests/ | tee pytest-coverage.txt + pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=fitbit_cli tests/ | tee pytest-coverage.txt - name: Pytest coverage comment uses: MishaKav/pytest-coverage-comment@main From 5a46055f568d50bdacb36b97cc7ac5c567045f31 Mon Sep 17 00:00:00 2001 From: Veerendra <8393701+veerendra2@users.noreply.github.com> Date: Wed, 1 Apr 2026 12:53:58 +0200 Subject: [PATCH 2/4] Fix --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 77a3a85..597dbf4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,7 +57,6 @@ jobs: run: | python -m pip install --upgrade pip pip install pytest pytest-cov - pip install -e . - name: Build coverage file run: | From 90fe61d6275ea728b278855dbf46fba626a1c298 Mon Sep 17 00:00:00 2001 From: Veerendra <8393701+veerendra2@users.noreply.github.com> Date: Thu, 2 Apr 2026 14:31:46 +0200 Subject: [PATCH 3/4] Remove test commenting step --- .github/workflows/ci.yml | 21 +++++++++------------ .github/workflows/release.yml | 10 ++++++++-- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 597dbf4..fc9da13 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,13 +1,16 @@ --- name: CI + on: - pull_request_target: - types: [opened, synchronize, reopened] + pull_request: + types: + - opened + - reopened + - synchronize permissions: contents: read checks: write - pull-requests: write jobs: lint: @@ -51,19 +54,13 @@ jobs: - name: Set up Python uses: actions/setup-python@v6 with: - python-version: "3.12" + python-version: "3.14" - name: Install Dependencies run: | python -m pip install --upgrade pip pip install pytest pytest-cov - - name: Build coverage file + - name: Run tests with coverage run: | - pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=fitbit_cli tests/ | tee pytest-coverage.txt - - - name: Pytest coverage comment - uses: MishaKav/pytest-coverage-comment@main - with: - pytest-coverage-path: ./pytest-coverage.txt - junitxml-path: ./pytest.xml + pytest --cov=fitbit_cli tests/ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fcdf684..c8b4bd9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,15 +9,21 @@ jobs: name: Publish to PyPI runs-on: ubuntu-slim steps: - - uses: actions/checkout@v6 + - name: Checkout Code + uses: actions/checkout@v6 + with: + fetch-depth: 0 + - name: Set up Python uses: actions/setup-python@v6 with: - python-version: "3.x" + python-version: "3.14" + - name: Install dependencies run: | python -m pip install --upgrade pip pip install setuptools wheel twine + - name: Build and publish env: TWINE_USERNAME: __token__ From f013336c88724f88cbc57a60318a88b149fb125b Mon Sep 17 00:00:00 2001 From: Veerendra <8393701+veerendra2@users.noreply.github.com> Date: Thu, 2 Apr 2026 15:00:30 +0200 Subject: [PATCH 4/4] Update AGENTS.md --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 939d9f5..6fa7e93 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -186,7 +186,7 @@ Use sparingly and only when justified: ## CI/CD -- **ci.yml**: Runs on PRs. Executes `super-linter` (black + isort + pylint; flake8/ruff disabled) then `pytest --cov` on Python 3.12. +- **ci.yml**: Runs on PRs. Executes `super-linter` (black + isort + pylint; flake8/ruff disabled) then `pytest --cov` on Python 3.14. - **release.yml**: Triggered on GitHub Release creation. Publishes to PyPI via `twine`. - **dependabot.yml**: Weekly updates for `pip` and `github-actions` dependencies.