Merge pull request #798 from ACEsuit/develop #407
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: unit tests | |
on: | |
pull_request: | |
push: | |
branches: [main] | |
jobs: | |
pytest-general: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.8','3.9','3.10','3.11','3.12'] | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: "pip" | |
- name: Install requirements (general tests) | |
run: | | |
pip install -U pip | |
pip install .[dev] | |
- name: Log installed environment (general tests) | |
run: | | |
python3 -m pip freeze | |
- name: Run general unit tests | |
run: | | |
pytest tests --ignore=tests/test_cueq.py | |
pytest-cueq: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
cache: "pip" | |
- name: Install requirements (with cueq) | |
run: | | |
pip install -U pip | |
pip install ".[dev, cueq]" | |
- name: Log installed environment (with cueq) | |
run: | | |
python3 -m pip freeze | |
- name: Run cueq-specific tests | |
run: | | |
pytest tests/test_cueq.py tests/test_calculator.py |