Skip to content

Initial lock scan

Initial lock scan #4

Workflow file for this run

name: Pytest
on:
pull_request:
jobs:
pytest:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"
- name: Install the project
run: uv sync --all-extras --dev
- name: Run tests with Coverage
run: uv run pytest tests --cov=. --cov-report=term > coverage_summary.txt
- name: Prepare Comment Body
run: |
echo '### Coverage Report' >> comment_body.md
echo '```txt' >> comment_body.md
cat coverage_summary.txt >> comment_body.md
echo '' >> comment_body.md
echo '```' >> comment_body.md
- name: Find Coverage Report Comment
id: find-comment
uses: peter-evans/find-comment@v3
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: github-actions[bot]
body-includes: '### Coverage Report'
- name: Create or Update Coverage Comment
uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.pull_request.number }}
body-path: comment_body.md
comment-id: ${{ steps.find-comment.outputs.comment-id }}
edit-mode: replace