ci: run pre-commit steps as CI checks
All checks were successful
/ tests (pull_request) Successful in 44s
/ static-analysis (pull_request) Successful in 1m25s
/ export-trace (pull_request) Successful in 31s

This commit is contained in:
Marc 2024-11-02 18:32:25 -04:00
parent 0cb41563f4
commit 9a6b33c4d7
Signed by: marc
GPG key ID: 048E042F22B5DC79

View file

@ -0,0 +1,32 @@
on: [pull_request]
jobs:
static-analysis:
runs-on: runner-latest
steps:
- uses: actions/checkout@v4
- name: Linting
run: pipx run pre-commit run ruff -a
- name: Format
run: pipx run pre-commit run ruff-format -a
- name: Validate Yaml
run: pipx run pre-commit run check-yaml -a
- name: Validate shell scripts
run: pipx run pre-commit run shellcheck -a
tests:
runs-on: runner-latest
steps:
- uses: actions/checkout@v4
- name: Tests
run: pipx run pre-commit run pytest
export-trace:
runs-on: runner-latest
needs: [static-analysis]
steps:
- uses: https://forge.karnov.club/marc/opentelemetry-trace-export-forgejo-action@main
with:
otlp-endpoint: "http://otel.home.karnov.club:4318"
forgejo-token: ${{ secrets.GITHUB_TOKEN }}
forgejo-base-url: ${{ env.GITHUB_SERVER_URL }}
run-id: ${{ env.GITHUB_RUN_NUMBER }}
repo-name: ${{ env.GITHUB_REPOSITORY }}