Tests #20
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: Tests | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
branches: ["main"] | |
push: | |
branches: ["main"] | |
tags: ["v*"] | |
schedule: | |
# run test automatically every day at 3 | |
- cron: "0 3 * * *" | |
defaults: | |
run: | |
shell: bash -el {0} | |
jobs: | |
tests: | |
name: Tests (${{ matrix.python-version }}, ${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: ["ubuntu-latest", # "macos-latest", | |
] | |
python-version: ["3.10", "3.11", "3.12", "3.13"] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
auto-update-conda: true | |
python-version: ${{ matrix.python-version }} | |
miniforge-version: latest | |
- name: Install dependencies | |
run: conda install pytorch | |
- name: Install | |
run: python -m pip install -e .\[tests-all\] | |
- name: List versions | |
run: | | |
conda list | |
python -c "import aimmd; print('aimmd version is: ', aimmd.__version__)" | |
- name: Unit tests | |
env: | |
PY_COLORS: "1" | |
run: pytest --runall -vv --cov=aimmd --cov-report=xml | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |