Skip to content

Commit

Permalink
Add pytest CI job
Browse files Browse the repository at this point in the history
  • Loading branch information
CasperWA committed Nov 22, 2023
1 parent 2b7bb90 commit 1c83851
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,39 @@ jobs:
exit 1
}
pytest:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python_version: ["3.10", "3.11", "3.12"]

steps:
- name: Checkout ${{ github.repository }}
uses: actions/checkout@v4

- name: Setup Python ${{ matrix.python_version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}

- name: Install test dependencies
run: |
python -m pip install -U pip
pip install -U setuptools wheel flit
pip install -U -e .[testing]
- name: Run pytest
run: pytest -vv --cov-report=xml

- name: Upload coverage
if: github.repository_owner == 'SINTEF' && matrix.python_version == '3.10'
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
env_vars: OS,PYTHON
env:
OS: ubuntu-latest
PYTHON: ${{ matrix.python_version }}

0 comments on commit 1c83851

Please sign in to comment.