Skip to content

[pre-commit.ci] pre-commit autoupdate #329

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #329

Workflow file for this run

name: Run Tests
on: [push, pull_request]
jobs:
tests:
name: Run Tests
defaults:
run:
shell: bash -l {0}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3.9, "3.10", "3.11", "3.12"]
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
- name: set up Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
python-version: ${{ matrix.python-version }}
environment-file: ci/test_environment.yml
activate-environment: hera_opm_tests
- name: Conda Info
run: |
conda info -a
conda list
PYVER=`python -c "import sys; print('{:d}.{:d}'.format(sys.version_info.major, sys.version_info.minor))"`
if [[ $PYVER != $PYTHON ]]; then
exit 1;
fi
- name: Run Tests
run: |
python -m pytest --cov=hera_opm --cov-report xml:coverage.xml
- name: Upload Coverage
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
flags: unittests
env_vars: PYTHON
verbose: true