Skip to content

pre-commit autoupdate #272

pre-commit autoupdate

pre-commit autoupdate #272

Workflow file for this run

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]
version:
- { python: "3.9", resolution: lowest-direct, extra: "tests,ovito,ase,pymatgen" }
- { python: "3.12", resolution: highest, extra: "tests,ovito,ase,pymatgen" }
# Add macOS without optional dependencies, running only on python 3.10
include:
- os: macos-latest
version: { python: "3.10", resolution: highest, extra: "tests,strict" }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.version.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.version.python }}
cache: pip
- name: Install dependencies
run: |
pip install uv
uv pip install -e .[${{ matrix.version.extra }}] --resolution=${{ matrix.version.resolution }} --system
# Fix ImportError: libEGL.so.1: ...
- name: Install libegl1-mesa-dev on Linux
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@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}