diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a47a49..fc9da13 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: @@ -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/ 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__ 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.