Skip to content

Finalisation steps for energy budgets #3123

Finalisation steps for energy budgets

Finalisation steps for energy budgets #3123

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Unit Tests
on:
[push, pull_request]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[all]
- name: Test doctests in source modules
run: |
pytest --doctest-modules src/scores/ --override-ini="addopts="
- name: Test with pytest, with dask and numba installed
run: |
# editable is necessary as pytest will run against the installed
# package rather than the local files creating a coverage report of 0%
pip install -e .
pytest -W error::RuntimeWarning tests/ --cov=src/
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2.3.0
with:
flag-name: run-${{ join(matrix.*, '-') }}
parallel: true
- name: Test tutorial notebooks with pytest
run: |
pytest --nbmake docs/tutorials/
- name: Test again with without dask and numba installed
run: |
# editable is necessary as pytest will run against the installed
# package rather than the local files creating a coverage report of 0%
pip install -e .
pip uninstall dask -y
pip uninstall numba -y
pytest tests/
finish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Indicate Coveralls Parallel Finished
uses: coverallsapp/github-action@v2.3.0
with:
parallel-finished: true