Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 11 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
---
name: ci
name: CI

on:
pull_request:
paths:
- "**/**"
types:
- opened
- reopened
- synchronize

permissions:
contents: write
contents: read
checks: write
pull-requests: write

jobs:
lint:
Expand Down Expand Up @@ -52,24 +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 flake8 pytest pytest-cov
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

- name: Build coverage file
run: |
pytest tests/ --cov=fitbit_cli --junitxml=/tmp/pytest.xml | tee /tmp/pytest-coverage.txt
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=app 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/
10 changes: 8 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down