Skip to content

Update python Docker tag to v3.13 #180

Update python Docker tag to v3.13

Update python Docker tag to v3.13 #180

Workflow file for this run

name: Run Unit Test via Pytest
on:
pull_request:
push:
branches:
- "master"
jobs:
lint-and-test:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
checks: write
strategy:
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup PDM
uses: pdm-project/setup-pdm@568ddd69406b30de1774ec0044b73ae06e716aa4 # v4
- name: Install dependencies
run: pdm install
- name: Lint with black
uses: psf/black@stable
with:
options: "--check --verbose"
- name: Test with pytest
run: |
pdm run pytest --junit-xml=test-results.xml
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@567cc7f8dcea3eba5da355f6ebc95663310d8a07 # v2
if: always()
with:
files: |
test-results.xml
- name: Test with coverage
run: |
pdm run coverage run -m pytest -v -s
- name: Generate Coverage Report
run: |
pdm run coverage report -m
- name: Coverage comment
id: coverage_comment
uses: py-cov-action/python-coverage-comment-action@3a591f9d4d095e8079eef2e56e5a5a33e85bfeff # v3
with:
GITHUB_TOKEN: ${{ github.token }}
- name: Store Pull Request comment to be posted
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
if: steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true'
with:
name: python-coverage-comment-action
path: python-coverage-comment-action.txt