Skip to content

Fix pytest github actions #169

Fix pytest github actions

Fix pytest github actions #169

Workflow file for this run

name: pytest
on:
push:
branches:
- main
tags-ignore:
- '**'
pull_request:
jobs:
pytest:
name: "Python ${{ matrix.py }} on OS ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
env:
COVERAGE_SINGLE: 78
COVERAGE_TOTAL: 78
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest"]
py: ["3.10", "3.11"]
steps:
- uses: "actions/checkout@v3"
- name: Setup python for test ${{ matrix.py }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py }}
- name: Install old dependencies for testing
if: ${{ matrix.py == '3.9'}}
run: |
pip install --upgrade pip
pip install pytest pytest-md pytest-emoji pytest-cov
pip install numpy==1.23 scipy==1.11.1 attrs==21.3.0
- name: Install new dependencies for testing
if: ${{ matrix.py == '3.11'}}
run: |
pip install --upgrade pip
pip install pytest pytest-md pytest-emoji pytest-cov
pip install numpy==2.0.0 scipy==1.14.0
- name: Install development version
run: |
# Need editable mode in order to include the test files
pip install --user git+https://github.com/theochem/iodata.git@main
pip install -e .[dev,iodata]
- name: Install Libcint library
if: ${{ matrix.os != 'windows-latest' }}
run: |
echo "${{ matrix.os }}"
sudo apt-get install -y sbcl
USE_LIBCINT=1 ./tools/install_libcint.sh
- name: Run Pytest
run: |
pytest --cov=./gbasis/ --cov-fail-under=78 --cov-report term .