28 lines
777 B
YAML
28 lines
777 B
YAML
name: Pytest
|
|
on: pull_request
|
|
permissions:
|
|
contents: read
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
jobs:
|
|
Test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
cache: "pip"
|
|
- name: Install dependencies
|
|
run: pip install -r requirements.txt
|
|
- name: Install failure annotation plugin
|
|
run: pip install pytest-github-actions-annotate-failures
|
|
- name: Test with pytest
|
|
run: pytest --junitxml=pytest.xml
|
|
- name: Upload Test Report
|
|
uses: actions/upload-artifact@v6
|
|
with:
|
|
name: pytest-report
|
|
path: pytest.xml
|
|
retention-days: 1 |