Skip to content

Run Tests

Run Tests #458

Workflow file for this run

name: Run Tests
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
schedule:
- cron: "0 0 * * *"
jobs:
test:
if: github.event.pull_request.draft == false
name: Grouper Tests (python)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macOS-latest, ubuntu-latest]
python-version: [3.9, 3.12]
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install environment
uses: mamba-org/setup-micromamba@v2
with:
environment-file: environment.yml
create-args: >-
python=${{ matrix.python-version }}
- name: Activate env
run: micromamba activate grouper-dev
- name: List libraries in grouper-dev
run: ls ${MAMBA_ROOT_PREFIX}/envs/grouper-dev/lib | grep omp
- name: Install package
run: micromamba run -n grouper-dev pip install -e .
- name: Test (OS -> ${{ matrix.os }} / Python -> ${{ matrix.python-version }})
run: micromamba run -n grouper-dev python -m pytest -v --cov-append --cov-config=pyproject.toml --color yes --pyargs Grouper
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
verbose: true
files: ./coverage.xml