Skip to content

Bump codecov/codecov-action from 3 to 4 #38

Bump codecov/codecov-action from 3 to 4

Bump codecov/codecov-action from 3 to 4 #38

Workflow file for this run

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@v4
- 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@v4
if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}