cspresso/.forgejo/workflows/lint.yml
Miguel Jacq fe58397da7
Some checks failed
CI / test (push) Failing after 1m20s
Lint / test (push) Failing after 28s
Trivy / test (push) Successful in 23s
Initial commit
2026-01-02 09:59:52 +11:00

40 lines
1.2 KiB
YAML

name: Lint
on:
push:
jobs:
test:
runs-on: docker
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install system dependencies
run: |
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
black pyflakes3 python3-bandit
- name: Run linters
run: |
black --diff --check src/cspresso/*
black --diff --check tests/*
pyflakes3 src/cspresso/*
pyflakes3 tests/*
bandit -r src/cspresso/
# Notify if any previous step in this job failed
- name: Notify on failure
if: ${{ failure() }}
env:
WEBHOOK_URL: ${{ secrets.NODERED_WEBHOOK_URL }}
REPOSITORY: ${{ forgejo.repository }}
RUN_NUMBER: ${{ forgejo.run_number }}
SERVER_URL: ${{ forgejo.server_url }}
run: |
curl -X POST \
-H "Content-Type: application/json" \
-d "{\"repository\":\"$REPOSITORY\",\"run_number\":\"$RUN_NUMBER\",\"status\":\"failure\",\"url\":\"$SERVER_URL/$REPOSITORY/actions/runs/$RUN_NUMBER\"}" \
"$WEBHOOK_URL"