Skip to content

test coverage for filters #877

test coverage for filters

test coverage for filters #877

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:
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements_cicd.txt
- name: Test with pytest
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 packages/utils
pip install -e packages/data[all]
pip install -e packages/training
pip install -e packages/pipeline[all]
pip install -e packages/zoo
pip install -e packages/bundled_models/fourcastnext
pip install -e .[test]
pytest -m="not noci" --cov=packages/data --cov=packages/utils --cov=packages/pipeline --cov=packages/training --cov=packages/zoo --cov=packages/bundled_models/fourcastnext --ignore=packages/nci_site_archive
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2.3.0
with:
flag-name: run-${{ join(matrix.*, '-') }}
parallel: true
finish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Indicate Coveralls Parallel Finished
uses: coverallsapp/github-action@v2.3.0
with:
parallel-finished: true