Skip to content

Torch Dataset

Torch Dataset #308

Workflow file for this run

name: Python test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@main
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --upgrade pip
pip install coverage==7.6.4
pip install pytest pytest-cov coverage-badge .
- name: Test with pytest and coverage badge
run: |
python --version
pip show coverage
pytest --cov=paint
coverage report -m --format markdown > cov_report.txt
coverage xml
- name: Post coverage report to PR
if: matrix.python-version == '3.11'
uses: marocchino/sticky-pull-request-comment@v2
with:
path: cov_report.txt
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}