New build style: uv, justfile, ruff, drop unused #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
- uses: "actions/checkout@v3" | |
- name: Set up uv | |
run: curl -LsSf https://astral.sh/uv/install.sh | sh | |
# Set up environment and run code quality checks | |
- name: "Run install deps" | |
run: "just bootstrap ${{ matrix.python-version }}" | |
- name: "Run code quality checks" | |
run: "just check" | |
# Enable when passing | |
# - name: "Run code quality checks" | |
# run: "just check-types" | |
- 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) }} |