Skip to content

[pre-commit.ci] pre-commit autoupdate #634

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #634

Workflow file for this run

name: Python package
on:
push:
pull_request:
types: [opened, reopened]
jobs:
pytest:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.12"]
torch-version: [2.7.0]
environment: ["default"]
include:
- torch-version: 2.7.0
torchvision-version: 0.21.0
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
with:
environments: ${{ matrix.environment }}
- name: Install dependencies
run: |
pixi run -e ${{ matrix.environment }} installpyg
pixi run -e ${{ matrix.environment }} pip install coverage==7.4.3 pytest-cov
pixi run -e ${{ matrix.environment }} installnat
pixi run -e ${{ matrix.environment }} install
- name: Setup with pytest-cov
run: |
# make PYTESTCOV
export PYTESTCOV="--cov=graph_weather tests/ --cov-report=xml"
# echo results and save env var for other jobs
echo "pytest-cov options that will be used are: $PYTESTCOV"
echo "PYTESTCOV=$PYTESTCOV" >> $GITHUB_ENV
- name: Run tests
run: |
export PYTEST_COMMAND="pytest $PYTESTCOV $PYTESTXDIST -s"
echo "Will be running this command: $PYTEST_COMMAND"
pixi run -e ${{ matrix.environment }} $PYTEST_COMMAND
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: false