Skip to content

Bump MishaKav/pytest-coverage-comment from 1.1.52 to 1.1.53 in the all-actions group #68

Bump MishaKav/pytest-coverage-comment from 1.1.52 to 1.1.53 in the all-actions group

Bump MishaKav/pytest-coverage-comment from 1.1.52 to 1.1.53 in the all-actions group #68

Workflow file for this run

name: PyTest
on:
pull_request:
paths-ignore:
- "**.md"
jobs:
test:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
strategy:
matrix:
python-version: ["3.11", "3.12"]
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[test]
- name: Install pytest-github-actions-annotate-failures plugin
run: pip install pytest-github-actions-annotate-failures
- name: Run PyTest
run: |
pytest -n 4 --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=bmctool | tee pytest-coverage.txt
- name: Pytest coverage comment
id: coverageComment
uses: MishaKav/[email protected]
with:
pytest-coverage-path: ./pytest-coverage.txt
junitxml-path: ./pytest.xml
- name: Create the Badge
uses: schneegans/[email protected]
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: 6296bce292048be38f06cc216719f558
filename: coverage.json
label: Coverage Report
message: ${{ steps.coverageComment.outputs.coverage }}
color: ${{ steps.coverageComment.outputs.color }}
namedLogo: python
- name: Set pipeline status
run: |
if [[ ${{ steps.coverageComment.outputs.errors }} -ne 0 || ${{ steps.coverageComment.outputs.failures }} -ne 0 ]]; then
echo "Errors or failures detected, marking pipeline as failure."
exit 1
fi