name: CI on: push: branches: [main] pull_request: branches: [main] jobs: check: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - uses: actions/setup-go@v6 with: go-version-file: go.mod - name: Install actionlint run: go install github.com/rhysd/actionlint/cmd/actionlint@v1.7.12 - name: Install golangci-lint run: go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.11.1 - name: Install Hugo run: go install github.com/gohugoio/hugo@v0.159.1 - name: Add local user bin to PATH run: echo "$HOME/.local/bin" >> "$GITHUB_PATH" - name: Install system tools run: sudo apt-get update && sudo apt-get install -y cloc pandoc - name: Install clankerval release package env: DEBIAN_FRONTEND: noninteractive GH_TOKEN: ${{ github.token }} run: | version="$(sed -n 's/^CLANKERVAL_PINNED_VERSION := //p' Makefile)" arch="$(dpkg --print-architecture)" pattern="clankerval_${version}-*_${arch}.deb" gh release download "v${version}" --repo clnkr-ai/clankerval --pattern "$pattern" deb="$(find . -maxdepth 1 -name "$pattern" -print -quit)" sudo apt-get update sudo apt-get install -y "$deb" rm -f "$deb" - name: Check run: | "$(go env GOPATH)/bin/actionlint" make check - name: Race tests run: go test -race ./... -v guardrails: runs-on: ubuntu-latest env: ARCHITECTURE_RELEASE_TAG: architecture-guardrail-bin-0.5.2 ARCHITECTURE_SHA256: 9168a0ba9ceeb6d556bc42c800b0435ef43b4a9f9b5c1a631b583e79a180c8df steps: - uses: actions/checkout@v5 - name: Install architecture guardrail binary env: GH_TOKEN: ${{ github.token }} run: | mkdir -p build/tools gh release download "$ARCHITECTURE_RELEASE_TAG" \ --repo clnkr-ai/clnkr \ --pattern architecture-linux-amd64 \ --dir build/tools echo "$ARCHITECTURE_SHA256 build/tools/architecture-linux-amd64" | sha256sum -c - chmod +x build/tools/architecture-linux-amd64 build/tools/architecture-linux-amd64 --help echo "THOTH_BIN=$PWD/build/tools/architecture-linux-amd64" >> "$GITHUB_ENV" - name: Run guardrail reports run: | make thoth-critical-check make architecture-shape-report make semantic-cohesion-report make test-fidelity-report