Merge pull request #57 from ab5424/housekeeping/remove-req #130
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: | |
push: | |
branches: [main] | |
paths-ignore: ["**/*.md", docs/**] | |
pull_request: | |
branches: [main] | |
paths-ignore: ["**/*.md", docs/**] | |
workflow_dispatch: | |
workflow_call: | |
permissions: | |
contents: read | |
jobs: | |
test: | |
# prevent this action from running on forks | |
if: github.repository == 'ab5424/agility' | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
python-version: ["3.9", "3.11"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- 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 dependencies | |
run: | | |
pip install uv | |
uv pip install packaging -e .[strict,dev,ovito,ase,pymatgen] --system | |
# Fix ImportError: libEGL.so.1: ... | |
- if: runner.os == 'Linux' | |
run: | | |
sudo apt update && sudo apt install -y libegl1-mesa-dev | |
- name: pytest | |
run: | | |
pytest --cov=agility --cov-report=xml tests | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest' | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |