Skip to content

New build style: uv, justfile, ruff, drop unused #1

New build style: uv, justfile, ruff, drop unused

New build style: uv, justfile, ruff, drop unused #1

Workflow file for this run

name: Tests
on:
pull_request:
branches:
- main
paths-ignore:
- 'docs/**'
- '*.md'
- '*.rst'
jobs:
tests:
env:
COVERAGE_DIR: ${{ format('/tmp/coverage/{0}', github.run_id) }}
permissions:
checks: write
contents: read
pull-requests: write
name: "Python ${{ matrix.python-version }} for ${{ matrix.os }}"
runs-on: "ubuntu-latest"
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: taiki-e/install-action@v2
with:
tool: just,uv
- uses: "actions/checkout@v3"
- uses: "actions/setup-python@v4"
with:
python-version: "${{ matrix.python-version }}"
- name: "Run install deps"
run: "just bootstrap"
- name: "Run code quality checks"
run: "just check"
- name: "Run tests"
run: "just ci-test ${COVERAGE_DIR}"
# Publish code coverage results
- name: Code Coverage Report
if: ${{ matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' }}
uses: irongut/[email protected]
with:
filename: coverage.xml
badge: true
fail_below_min: true
format: markdown
hide_branch_rate: false
hide_complexity: true
indicators: true
output: both
thresholds: '70 80'
- name: Add Coverage PR Comment
if: ${{ matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' }}
uses: marocchino/sticky-pull-request-comment@v2
with:
recreate: true
path: code-coverage-results.md
# Publish junit test result
- name: Publish Test Report
if: ${{ matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' }}
uses: mikepenz/action-junit-report@v4
with:
report_paths: ${{ format('/tmp/coverage/{0}/*junit.xml', github.run_id) }}