Skip to content

Implement GitHubSectionChangeNote.build_from_github_event And Sev… #242

Implement GitHubSectionChangeNote.build_from_github_event And Sev…

Implement GitHubSectionChangeNote.build_from_github_event And Sev… #242

Workflow file for this run

name: Unit Tests
on:
pull_request:
paths:
- src/**
- tests/**
- pyproject.toml
- requirements-dev.txt
- '.github/workflows/unit_tests.yml'
push:
branches:
- main
jobs:
pytest:
name: pytest
runs-on: ${{matrix.os}}
strategy:
matrix:
python-version: ['3.12', '3.13']
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: False
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: |
**/requirements*.txt
pyproject.toml
- name: Install dependencies
run: |
python -W ignore -m pip install --upgrade pip
python -W ignore -m pip install -r requirements-dev.txt
python -W ignore -m pip install pytest-randomly
- name: Test with pytest
run: |
pytest --cov -v --junit-xml=.test_junit.xml
- name: Test Summary
id: test_summary
uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4
if: always() # always run, even if tests fail
with:
paths: |
.test_junit.xml
- name: Submit coverage
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1
with:
env_vars: OS,PYTHON
name: ${{ matrix.os }}-${{ matrix.python-version }}
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload test results to Codecov
uses: codecov/test-results-action@4e79e65778be1cecd5df25e14af1eafb6df80ea9 # v1.0.2
if: ${{ !cancelled() }}
with:
files: .test_junit.xml
token: ${{ secrets.CODECOV_TOKEN }}