Skip to content

Plan production on PR, rename some workflows #4

Plan production on PR, rename some workflows

Plan production on PR, rename some workflows #4

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@09d2acae674a48949e3602304ab46fd20ae0c42f
- 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@09d2acae674a48949e3602304ab46fd20ae0c42f
- name: Set up Python ${{ matrix.python-version }}
uses: astral-sh/setup-uv@bd01e18f51369d5a26f1651c3cb451d3417e3bba
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/