{"id":50520231,"url":"https://github.com/devops-infra/triglav","last_synced_at":"2026-06-03T03:30:54.349Z","repository":{"id":359812066,"uuid":"1247599770","full_name":"devops-infra/triglav","owner":"devops-infra","description":null,"archived":false,"fork":false,"pushed_at":"2026-06-01T21:23:42.000Z","size":2361,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-01T23:16:05.912Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devops-infra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-23T14:31:09.000Z","updated_at":"2026-06-01T21:23:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/devops-infra/triglav","commit_stats":null,"previous_names":["devops-infra/end-to-end-tests","devops-infra/triglav"],"tags_count":0,"template":false,"template_full_name":"devops-infra/template-repository","purl":"pkg:github/devops-infra/triglav","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devops-infra%2Ftriglav","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devops-infra%2Ftriglav/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devops-infra%2Ftriglav/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devops-infra%2Ftriglav/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devops-infra","download_url":"https://codeload.github.com/devops-infra/triglav/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devops-infra%2Ftriglav/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33847264,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-03T02:00:06.370Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-03T03:30:51.415Z","updated_at":"2026-06-03T03:30:54.337Z","avatar_url":"https://github.com/devops-infra.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Triglav\n\n## End-to-End Tests Framework\n\nRepository-level framework used to validate `devops-infra` automation end-to-end, with a focus on GitHub Actions behavior in real workflow runs.\n\n![Triglav](img/triglav.png)\n\n## Why Triglav\n\nIn Slavic mythology, Triglav represents three realms. That maps well to this framework's validation layers:\n\n- pull request lifecycle and branch management behavior\n- integration tests against live GitHub runtime\n- periodic regression testing to catch unexpected changes\n\n## Scope\n\n- Executes reusable and action-specific E2E workflows in this repository.\n- Verifies outputs, expected failures, and integration behavior against live GitHub runtime.\n- Provides a stable place to add regression tests before rolling changes organization-wide.\n\n## Covered Actions and Test Types\n\n| Action                                         | Workflow                                                    | Test Coverage                                                                                                                   |\n|------------------------------------------------|-------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------|\n| `devops-infra/action-commit-push`              | `.github/workflows/e2e-action-commit-push.yml`              | branch creation/push, custom message/prefix, empty commit mode, amend with force-with-lease, output verification, cleanup       |\n| `devops-infra/action-pull-request`             | `.github/workflows/e2e-action-pull-request.yml`             | PR creation/update paths, custom title/body, draft + `get_diff`, `repository` + `repository_path`, output verification, cleanup |\n| `devops-infra/action-format-hcl`               | `.github/workflows/e2e-action-format-hcl.yml`               | check mode pass/fail, write mode, list/diff mode, malformed input detection                                                     |\n| `devops-infra/action-container-structure-test` | `.github/workflows/e2e-action-container-structure-test.yml` | text/json/junit output modes, report file creation, multi-config execution, output counters                                     |\n| `devops-infra/action-terraform-copy-vars`      | `.github/workflows/e2e-action-terraform-copy-vars.yml`      | variable propagation across modules, custom path inputs, strict missing-variable failure mode                                   |\n| `devops-infra/action-terraform-validate`       | `.github/workflows/e2e-action-terraform-validate.yml`       | valid module validation, scoped validation via `dir_filter`                                                                     |\n| `devops-infra/action-tflint`                   | `.github/workflows/e2e-action-tflint.yml`                   | lint execution across modules, scoped lint via `dir_filter`, non-blocking findings mode                                         |\n| `devops-infra/template-action`                 | `.github/workflows/e2e-action-template-action.yml`          | baseline template behavior validation, output contract checks, debug-mode execution                                             |\n\n## Workflow Orchestration\n\n- Main orchestrator: `.github/workflows/cron-e2e-tests.yml`\n- Triggers:\n  - weekly cron schedule\n  - manual dispatch (`workflow_dispatch`)\n- Executes all action-focused E2E workflows via reusable `workflow_call` jobs.\n\n## Local Development\n\nPrerequisites:\n\n- `task`\n- `docker`\n- `gh` (authenticated)\n- `python3 -m pylint` available in your environment (local install is acceptable)\n\nCommon commands:\n\n```bash\ntask lint\ntask pre-commit\ntask e2e:list-workflows\ntask e2e:run WORKFLOW=e2e-action-pull-request.yml\ntask e2e:run WORKFLOW=e2e-action-format-hcl.yml MODE=image IMAGE_TAG=v1.2.3-test\ntask e2e:run:all\ntask e2e:run:all MODE=image IMAGE_TAG=v1.2.3-test\ntask test:coverage:report\ntask test:coverage:gate\n```\n\nUseful follow-up commands:\n\n```bash\ntask e2e:view-latest WORKFLOW=e2e-action-pull-request.yml\ntask e2e:watch RUN_ID=\u003crun-id\u003e\n```\n\n## Manual Workflow Runs: Permissions and Secrets\n\nWhen triggering workflows manually with `gh workflow run`, ensure:\n\n- Your local GitHub CLI token has `repo` and `workflow` scopes.\n- `gh auth status` is healthy for the same GitHub account that can run workflows in this repository.\n- Workflow job permissions remain enabled for tested actions:\n  - `contents: write` for branch/commit operations (`action-commit-push`, `action-pull-request` tests)\n  - `pull-requests: write` and `issues: write` for PR lifecycle operations (`action-pull-request` tests)\n  - `contents: read` for read-only action workflows (`action-format-hcl`, `action-tflint`, `action-terraform-*`, `action-container-structure-test`)\n\nManual dispatch examples:\n\n```bash\ntask e2e:run WORKFLOW=e2e-action-commit-push.yml\ntask e2e:run:all\ntask e2e:run WORKFLOW=e2e-action-tflint.yml MODE=image IMAGE_TAG=v1.2.3-test\n```\n\nThis repository primarily relies on the built-in `${{ secrets.GITHUB_TOKEN }}` in workflow runs.\nIf future scenarios require elevated credentials, define additional secrets in repository settings and document them in the specific workflow file.\n\n## Input Coverage Gate\n\n- Coverage report: `task test:coverage:report`\n- Strict gate: `task test:coverage:gate`\n- Baseline file for currently accepted uncovered inputs: `tests/coverage-baseline.json`\n\nThe strict gate fails only when newly uncovered inputs appear outside the baseline.\n\n## Reusable Workflow Usage in Action Repositories\n\nEach `e2e-action-*.yml` workflow supports `workflow_call`, so action repositories can reuse this framework for pre-merge checks.\n\nCurrent org-wide automation wiring:\n\n- Pull request flow (`reusable-auto-pull-request-create.yml`) calls action-specific E2E workflows for `action-*` repositories.\n- Release branch prepare flow (`reusable-manual-release-branch-prepare.yml`) calls action-specific E2E workflows against `release/*` refs and `-rc` tags.\n- Release create flow (`reusable-auto-release-create.yml`) calls action-specific E2E workflows against production release tags/images.\n\nRecommended pre-merge strategy:\n\n- Run E2E with action refs that point to the PR under test (branch or SHA).\n- Run image-tag verification stages for `-test` and `-rc` tags after image publication in release pipelines.\n\nExecution modes:\n\n- `mode=ref` runs ref-oriented E2E paths against stable pinned action refs.\n- `mode=image` validates a published Docker image and requires `image_tag`. This is authoritative in release image checks.\n- Use semantic tags for `image_tag` in automation (`vX.Y.Z-test`, `vX.Y.Z-rc`, `vX.Y.Z`) instead of mutable aliases.\n\nCurrent mode behavior by workflow:\n\n- `e2e-action-commit-push.yml`: `ref` authoritative, `image` placeholder preview.\n- `e2e-action-pull-request.yml`: `ref` authoritative, `image` placeholder preview.\n- `e2e-action-template-action.yml`: `ref` authoritative, `image` placeholder preview.\n- `e2e-action-container-structure-test.yml`: `ref` authoritative in reusable CI flows, `image` preview.\n- `e2e-action-format-hcl.yml`: `ref` and executable `image` supported.\n- `e2e-action-tflint.yml`: `ref` and executable `image` supported.\n- `e2e-action-terraform-validate.yml`: `ref` and executable `image` supported.\n- `e2e-action-terraform-copy-vars.yml`: `ref` and executable `image` supported.\n\nExample callers from another action repository:\n\n```yaml\njobs:\n  e2e-pr-validation:\n    uses: devops-infra/triglav/.github/workflows/e2e-action-pull-request.yml@master\n    with:\n      mode: ref\n```\n\n```yaml\njobs:\n  e2e-image-validation:\n    uses: devops-infra/triglav/.github/workflows/e2e-action-format-hcl.yml@master\n    with:\n      mode: image\n      image_tag: v1.2.3-test\n```\n\n## Notes\n\n- E2E workflows intentionally create temporary test branches and pull requests and then clean them up.\n- Use this repository to validate behavior before promoting changes in action repositories or reusable org workflows.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevops-infra%2Ftriglav","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevops-infra%2Ftriglav","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevops-infra%2Ftriglav/lists"}