Skip to content
name: Pull Request Coverage Report
on:
pull_request:
branches: [main, dev]
jobs:
run_coverage:
timeout-minutes: 5
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
repository-projects: read
contents: read
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Set up Python 3.12
uses: actions/setup-python@v1
with:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python3 -m pip install robotpy==2024.2.1.1
python3 -m pip install coverage
python3 -m robotpy sync
- name: Run Coverage
run: |
python3 -m robotpy coverage test --coverage-mode
- run: coverage xml --omit=mechanism_setup.py
- name: Get Cover
uses: orgoro/coverage@v3.1
with:
coverageFile: coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
thresholdAll: .7
thresholdNew: .8
passIcon: '🎉'
failIcon: '💩'