Zum Inhalt

Statische Tests

Führt ein minimales Bündel statischer Analyse bei jedem Push aus und liefert schnelles Feedback ohne externe Dienste.


Verwendung

.github/workflows/build-static-tests.yaml
on:
  push:

jobs:
  static:
    uses: nolte/gh-plumbing/.github/workflows/reusable-pre-commit.yaml@<tag>

Erforderlicher Status-Check

Kombiniere den Workflow mit einer Branch-Protection-Regel, die den Check static / Static CI Tests verlangt — siehe Settings.


Zentrale Konfiguration

.github/workflows/reusable-pre-commit.yaml
name: Reusable — Pre-Commit

on:
  workflow_call:
# Explicit permissions per spec/project/github-actions-best-practices §B:
# workflow level is the minimum, write scopes are granted per job.
permissions:
  contents: read # checkout + pre-commit; the hooks never push


jobs:
  static:
    name: "Static CI Tests"
    runs-on: ubuntu-latest
    steps:
      - name: Checkout sources
        uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0

      - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
        with:
          python-version: '3.x'

      - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1