-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (49 loc) · 1.67 KB
/
pull-request-python-tests.yml
File metadata and controls
53 lines (49 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Python Tests
on:
pull_request:
branches: [ "**" ]
permissions:
contents: write
checks: write
pull-requests: write
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8edcb1bdb4e267140fa742c62e395cd74f332709
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: '3.13'
- uses: launchbynttdata/actions-asdf-install_tools@v0.2.0
with:
exclude_tools: "python"
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd
run-tests:
needs: [ pre-commit ]
runs-on: ubuntu-latest
strategy:
matrix:
# Adjust the matrix to test against different or multiple versions.
# Note that adding more versions will result in a code coverage report
# for each version; you may wish to adjust that step's behavior.
python-version: ["3.13"]
steps:
- uses: actions/checkout@8edcb1bdb4e267140fa742c62e395cd74f332709
- name: Set up Python ${{ matrix.python-version }}
uses: astral-sh/setup-uv@d9e0f98d3fc6adb07d1e3d37f3043649ddad06a1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
uv sync
- name: Test with pytest
run: |
uv run pytest
- name: Report coverage
uses: MishaKav/pytest-coverage-comment@13d3c18e21895566c746187c9ea74736372e5e91
with:
pytest-xml-coverage-path: ./htmlcov/coverage.xml
title: Coverage report for Python ${{ matrix.python-version }}
remove-link-from-badge: true
unique-id-for-comment: ${{ matrix.python-version }}
coverage-path-prefix: src/