name: CI on: push: branches: [main] pull_request: permissions: {} jobs: tofu: uses: ChiefGyk3D/git-your-ship-together/.github/workflows/tofu-ci.yml@01f397834f7acc553593abefbba135b18f580730 # v1.34.0 permissions: contents: read id-token: write with: directories: "stacks/00-foundation stacks/10-access stacks/20-telemetry stacks/30-workloads stacks/50-edge stacks/aws/00-foundation stacks/aws/10-access modules/vpc modules/firewall modules/twingate-bootstrap modules/twingate-connector modules/edge-host modules/docker-host modules/aws/vpc modules/aws/firewall modules/aws/twingate-connector modules/spaces-bucket" # tofu test in each directory; every test file mocks its providers, so # the job needs no credential, which is all a pull request may have. test: true # opa fmt, check --strict and test over the Spacelift push policy. policy-directories: .spacelift/policies # The workflow-lint job installs pyflakes with pipx; GYST v1.28.0 runs # secretless jobs in block and the tofu-ci default allow-list has no # PyPI hosts. extra-allowed-endpoints: "files.pythonhosted.org:443 pypi.org:443" python: uses: ChiefGyk3D/git-your-ship-together/.github/workflows/python-ci.yml@01f397834f7acc553593abefbba135b18f580730 # v1.34.0 permissions: contents: read id-token: write with: python-versions: '["3.12", "3.13"]' install-command: pip install pytest==9.2.0 pyyaml==6.0.2 # The cost gate first: it is a script in this repository, so it rides the # Python job rather than needing a job of its own. The settings page check # fails when docs/wiki/Settings-Reference.md is stale against # docs/settings.json, and the project status check fails when # docs/wiki/Project-Status.md does not match its committed snapshot (offline; # no GitHub token in CI). The repository growth check is offline too: it # compares the snapshot, its recorded hashes, the committed chart PNG and the # growth page, with no token and no plotting library. The wiki navigation check # fails when a page is missing from (or dead in) docs/wiki/_nav.yaml or when # Contents.md or _Sidebar.md is stale against it. The identifier check (no cloud account ids in a # public repository) runs last. test-command: bash scripts/ci_cost_gate.sh && python -I scripts/gen_settings_doc.py --check && python -I scripts/gen_project_status.py --check && python3 -I scripts/gen_repo_metrics.py --check && python -I scripts/gen_wiki_nav.py --check && python -I -m pytest tests -q && python -I scripts/identifier_check.py --root . && python -I scripts/threat_dragon_layout.py --check lint-install-command: pip install ruff==0.17.0 lint-command: ruff check scripts tests workflow-lint: false docker-build: false security: uses: ChiefGyk3D/git-your-ship-together/.github/workflows/security.yml@01f397834f7acc553593abefbba135b18f580730 # v1.34.0 permissions: contents: read security-events: write pull-requests: write id-token: write with: codeql-languages: actions pip-audit-requirements: "" ci-green: name: CI green if: ${{ always() }} needs: [tofu, python, security] runs-on: ubuntu-latest permissions: {} steps: - name: Fail unless every needed job succeeded env: RESULTS: ${{ join(needs.*.result, ' ') }} run: | for r in $RESULTS; do [ "$r" = "success" ] || { echo "a needed job finished as: $r"; exit 1; } done