Skip to content

✨ Update Taskfile and CI Workflow #6

✨ Update Taskfile and CI Workflow

✨ Update Taskfile and CI Workflow #6

Workflow file for this run

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: ci
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
id-token: write
pull-requests: write
jobs:
ci:
name: ${{ matrix.name }}
runs-on: ubuntu-24.04
concurrency:
group: ${{ github.workflow }}-${{ matrix.name }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
include:
- name: test
task: test
annotations_pytest: true
pytest_coverage: true
- name: pre-commit
task: install
steps:
- name: ${{ matrix.name }}
uses: juftin/actions/taskfile@v1
with:
task: ${{ matrix.task }}
checkout: true
install: ${{ matrix.name != 'pre-commit' }}
fetch-depth: ${{ matrix.name == 'pre-commit' && '0' || '1' }}
setup-uv: true
github-token: ${{ secrets.GITHUB_TOKEN }}
annotations-ruff: ${{ matrix.annotations_ruff || false }}
annotations-mypy: ${{ matrix.annotations_mypy || false }}
annotations-pytest: ${{ matrix.annotations_pytest || false }}
pytest-coverage: ${{ matrix.pytest_coverage && github.event_name == 'pull_request' || false }}
- name: pre-commit
if: matrix.name == 'pre-commit' && github.event_name == 'pull_request'
run: |
uv tool run --isolated \
--with pre-commit-uv \
pre-commit run \
--color always \
--from-ref ${{ github.event.pull_request.base.sha }} \
--to-ref ${{ github.event.pull_request.head.sha }}