GitHub Action
You can easily integrate TangleGuard into your GitHub workflow by using the pre-built GitHub Action. You can do one of the following:
- Validate: This checks your codebase regarding circular dependencies and fails the workflow if any are found. Useful for enforcing architecture rules in pull requests.
- Upload: This uploads the result data to TangleGuard Cloud version, which provides a hosted analytics plattform.
Validate in CI/CD
Section titled βValidate in CI/CDβUse this to validate your codebase for circular dependencies on every pull request. The workflow will fail if any circular dependencies are found.
name: Architecture Validationon: [pull_request]
jobs: validate-architecture: runs-on: ubuntu-latest steps: - uses: TangleGuard/github-action@main with: upload_results: "true" make_public: "true" language: "rust" fail_on_findings: "true"Below you see an example output when circular dependencies are detected:
π Checking for circular dependencies...π¦ Cross-package circular dependencies (2): π content β markdown β templates β content π markdown β templates β markdown
π§© Module-level circular dependencies (6): π content (6 cycles): π content::library β content::page β content::library π content::library β content::ser β content::library π content::library β content::ser β content::page β content::library π content::library β content::taxonomies β content::library π content::page β content::ser β content::page π content::section β content::ser β content::section
β Found 8 circular dependencies (609.63Β΅s)Set fail_on_findings: "false" if you want to see the validation results without failing the workflow.
Upload to Cloud
Section titled βUpload to CloudβIt validates your codebase against your TangleGuard configuration file and hence regarding your predefined rules.
Hereβs a simple example of how to use the GitHub Action in your workflow:
name: Architecture Checkon: [push, pull_request]
jobs: upload-architecture: runs-on: ubuntu-latest steps: - uses: TangleGuard/github-action@main with: upload_results: "true" make_public: "true" language: "rust" description: "A static code analysis tool focused on code architecture."Below you see the logs of the above upload-architecture job:
Scanning workspace and uploading results to TangleGuard Cloud... _____ _ ___ _/__ \__ _ _ __ __ _| | ___ / _ \_ _ __ _ _ __ __| | / /\/ _` | '_ \ / _` | |/ _ \/ /_\/ | | |/ _` | '__/ _` | / / | (_| | | | | (_| | | __/ /_\\| |_| | (_| | | | (_| | \/ \__,_|_| |_|\__, |_|\___\____/ \__,_|\__,_|_| \__,_| |___/2026-01-07T18:06:40.907446Z INFO TangleGuard CLI - analyzing workspace at: .2026-01-07T18:06:40.970551Z INFO Workspace scan completed in 63.09ms total2026-01-07T18:06:40.970570Z INFO Successfully scanned workspace with 6 packages2026-01-07T18:06:40.970574Z INFO No repository info provided, extracting from Git...2026-01-07T18:06:40.993369Z INFO Extracted: TangleGuard/TangleGuard2026-01-07T18:06:40.993671Z INFO Found origin2026-01-07T18:06:41.035836Z INFO Uploading...2026-01-07T18:06:42.725524Z INFO Successfully uploaded workspace to server!