Skip to content

CI: trigger per-commit workflow on labeled PRs #4

CI: trigger per-commit workflow on labeled PRs

CI: trigger per-commit workflow on labeled PRs #4

Workflow file for this run

name: CI per commit (labeled PRs)
on:
push:
branches:
- main
pull_request:
types: [labeled]
branches:
- main
jobs:
check-label:
name: Check for ci:per-commit label
runs-on: ubuntu-latest
outputs:
has_label: ${{ steps.check.outputs.has_label }}
steps:
- uses: actions/checkout@v6
- name: Check for label
id: check
env:
GH_TOKEN: ${{ github.token }}
run: |
.github/scripts/check-ci-per-commit-label.sh \
"${{ github.event_name }}" \
"${{ github.repository }}" \
"${{ github.sha }}" \
'${{ toJSON(github.event.pull_request.labels.*.name) }}' \
>> "$GITHUB_OUTPUT"
ci:
name: CI
needs: check-label
if: needs.check-label.outputs.has_label == 'true'
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync
- name: lint
run: uv run ruff check .
- name: format check
run: uv run black --check .
- name: sort-check
run: uv run isort --check-only .
- name: typecheck
run: uv run mypy l9format
- name: test
run: uv run pytest
- name: security-audit
run: uv run pip-audit