Run Tests #458
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |