Skip to content

update test matrix #112

update test matrix

update test matrix #112

Workflow file for this run

name: CI
permissions:
contents: read
pull-requests: write
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["pypy3.11", "3.11", "3.12", "3.13"]
name: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- 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
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
# fail_ci_if_error: false
name: codecov-umbrella
verbose: true
mypy:
name: mypy
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: Verify type hints
run: |
pdm run mypy
isort:
name: isort
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: Check import formatting
run: |
pdm run isort --check --verbose
black:
name: black
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: Check code style
run: |
pdm run black --check --verbose
mdformat:
name: mdformat
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: Check markdown style
run: |
pdm run mdformat --check --exclude ".venv/**"