Skip to content

ENH: Reviser par Sonnet 5 #33

ENH: Reviser par Sonnet 5

ENH: Reviser par Sonnet 5 #33

Workflow file for this run

name: Unit tests
on:
push:
branches: ["main"]
pull_request:
# Needed to write the coverage badge to the coverage-badge branch
# May be redundant if actions have default write permission
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
cache: 'pip'
python-version: '3.12'
- name: Clear Torch Inductor Cache
run: rm -rf ~/.cache/torch/inductor/*
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# coverage-badge 1.1.2 still imports pkg_resources, which was
# removed from newer Setuptools releases.
python -m pip install 'setuptools<82'
python -m pip install -e '.[test]'
- name: Test with pytest
run: |
python -m pytest --cov
- name: Creating coverage folder
run: |
mkdir -p coverage
- name: Coverage Badge
uses: tj-actions/coverage-badge-py@v1.8
with:
output: coverage/coverage.svg
- name: Publish coverage report to coverage-badge branch
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: coverage-badge
folder: coverage