blogue/.forgejo/workflows/ci.yml

36 lines
1.1 KiB
YAML
Raw Normal View History

2024-11-16 04:23:57 +00:00
on:
push:
branches: [main]
pull_request:
2024-10-28 00:34:28 +00:00
jobs:
static-analysis:
runs-on: runner-latest
steps:
- uses: actions/checkout@v4
2024-11-16 04:22:32 +00:00
- uses: https://github.com/astral-sh/setup-uv@v3
2024-10-28 00:34:28 +00:00
- 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
2024-11-16 04:22:32 +00:00
- name: Check types
run: |
uv venv
uv pip install .
pipx run pre-commit run pyright -a
2024-10-28 00:34:28 +00:00
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 }}