Fix coverage not working #30
Workflow file for this run
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/**] | |
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@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
cache-dependency-path: setup.py | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip wheel | |
python -m pip install numpy packaging | |
python -m pip install -e '.[dev,ovito]' | |
# 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@v3 | |
if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest' | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |