Skip to content

Codecov

Codecov #19

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
name: Tests & Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.13
uses: actions/setup-python@v4
with:
python-version: "3.13"
- name: Install PDM
run: |
python -m pip install --upgrade pip
pip install pdm
- name: Install dependencies
run: |
pdm install -G:all
- name: Run tests with coverage
run: |
pdm run pytest --cov=fitbit_client --cov-report=xml:coverage.xml
# Debug step to show repository info
- name: Debug repository info
run: |
echo "Repository: ${{ github.repository }}"
echo "Owner: ${{ github.repository_owner }}"
echo "Repo name: ${{ github.event.repository.name }}"
echo "Commit SHA: ${{ github.sha }}"
echo "Branch: ${{ github.ref }}"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
slug: ${{ github.repository }} # Explicitly set the repository slug
override_branch: ${{ github.ref_name }}
override_commit: ${{ github.sha }}
verbose: true
fail_ci_if_error: false