unittests #121
This file contains 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: unittests | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- "*" | |
branches: | |
- main | |
- "ci/*" | |
pull_request: | |
jobs: | |
unittests: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: "bash -l {0}" | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: | |
- '3.10' | |
- '3.11' | |
- '3.12' | |
name: Tests for Python ${{ matrix.python-version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
mamba-version: "*" | |
channels: conda-forge,defaults | |
channel-priority: true | |
python-version: ${{ matrix.python-version }} | |
activate-environment: formulate-env | |
# - name: Install ROOT | |
# run: | | |
# mamba install root -y | |
- name: Install test dependencies | |
run: | | |
python -m pip install --upgrade pip | |
mamba install coveralls -y | |
mamba install pytest-cov -y | |
pip install -e .[dev,test] | |
- name: Test with pytest | |
run: | | |
pytest --cov=formulate --verbose |