Skip to content

added junit reporter #8

added junit reporter

added junit reporter #8

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python application
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
test-package:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.9", "3.10"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
# TODO: pytorch install has to be done in an extra github job: see pytorch_geometric for an example
- name: Install torch
run:
pip3 install torch==1.11.0 torchvision==0.12.0
- name: Install package
run: |
python -m pip install --upgrade pip
pip install -e .["test"]
- name: Test with pytest
run: |
pytest --junitxml=test/junit/test_report-${{ matrix.python-version }}.xml --cov-report=xml
- name: Upload Test Report
uses: actions/upload-artifact@v4
with:
name: test_report-${{ matrix.python-version }}.xml
path: test/junit/test_report-${{ matrix.python-version }}.xml
- name: Show Test Report
uses: dorny/test-reporter@v1
with:
name: Pytest Report
artifact: test_report-${{ matrix.python-version }}.xml
path: test_report-${{ matrix.python-version }}.xml
reporter: jest-junit