Skip to content

Merge pull request #28 from steinmig/unittests #1

Merge pull request #28 from steinmig/unittests

Merge pull request #28 from steinmig/unittests #1

Workflow file for this run

name: Test NeuralForceField package
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# python-version: ["pypy3.10", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.10"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install basics
run: python -m pip install --upgrade pip setuptools wheel
- name: Install package
run: python -m pip install .
# - name: Install linters
# run: python -m pip install flake8 mypy pylint
# - name: Install documentation requirements
# run: python -m pip install -r docs/requirements.txt
# - name: Test with flake8
# run: flake8 polymethod
# - name: Test with mypy
# run: mypy polymethod
# - name: Test with pylint
# run: pylint polymethod
- name: Test with pytest
run: |
pip install pytest pytest-cov
pytest nff/tests --doctest-modules --junitxml=junit/test-results-${{ matrix.python-version }}.xml --cov=nff --cov-report=xml --cov-report=html
- name: Upload pytest test results
uses: actions/upload-artifact@v4
with:
name: pytest-results-${{ matrix.python-version }}
path: junit/test-results-${{ matrix.python-version }}.xml
if: ${{ always() }}
# - name: Test documentation
# run: sphinx-build docs/source docs/build