Skip to content

build(deps): bump the pip group across 2 directories with 1 update (#… #614

build(deps): bump the pip group across 2 directories with 1 update (#…

build(deps): bump the pip group across 2 directories with 1 update (#… #614

Workflow file for this run

permissions:
contents: read
name: test-package
on:
pull_request:
paths:
- "codecarbon/**"
- "tests/**"
- "pyproject.toml"
- "uv.lock"
- ".github/workflows/test-package.yml"
push:
branches: [master]
jobs:
python-test:
runs-on: ubuntu-24.04
env:
CODECARBON_API_KEY: ${{ secrets.CODECARBON_API_TOKEN }}
CODECARBON_EXPERIMENT_ID: ${{ secrets.CODECARBON_EXPERIMENT_ID_TEST_PACKAGE }}
strategy:
matrix:
python-version: ["3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install uv
uses: astral-sh/setup-uv@eb1897b8dc4b5d5bfe39a428a8f2304605e0983c # v7
with:
version: "latest"
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --python ${{ matrix.python-version }}
- name: Test package
run: uv run --python ${{ matrix.python-version }} codecarbon monitor -- uv run --python ${{ matrix.python-version }} task test-coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Install carbonboard dependencies
run: uv pip install --python ${{ matrix.python-version }} dash 'dash_bootstrap_components>1.0.0' fire
- name: Test carbonboard visualization
run: uv run --python ${{ matrix.python-version }} pytest -vv tests/test_viz_data.py tests/test_viz_units.py