Files
podinfo/.github/workflows/test.yml
T
dependabot[bot]andGitHub ee021565e5 build(deps): bump the actions group with 3 updates
---
updated-dependencies:
- dependency-name: golang/govulncheck-action
  dependency-version: 1.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: fluxcd/flux2/action
  dependency-version: 2.9.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: fluxcd/flux-schema/actions/setup
  dependency-version: 0.10.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-13 06:44:50 +00:00

69 lines
2.1 KiB
YAML

name: test
on:
pull_request:
push:
branches:
- 'master'
permissions:
contents: read
env:
HELM_VERSION: 4.2.0
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: ./.github/actions/runner-cleanup
- name: Setup Go
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
with:
go-version: 1.26.x
cache-dependency-path: |
**/go.sum
**/go.mod
- name: Setup Flux Schema CLI
uses: fluxcd/flux-schema/actions/setup@d802c91e082416f3cc57260d4e97586b8f0731c6 # v0.10.1
- name: Setup Helm
uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1
with:
version: v${{ env.HELM_VERSION }}
- name: Setup CUE
uses: cue-lang/setup-cue@a93fa358375740cd8b0078f76355512b9208acb1 # v1.0.1
- name: Setup Timoni
uses: stefanprodan/timoni/actions/setup@69e421aebbed979ded721df0da2a54428c5b4b9c # v0.27.0
- name: Run unit tests
run: make test
- name: Validate Helm chart
run: |
helm lint ./charts/podinfo/
helm template ./charts/podinfo/ | flux-schema validate --verbose
- name: Validate Kustomize overlay
run: |
kubectl kustomize ./kustomize/ | flux-schema validate --verbose
- name: Verify CUE formatting
working-directory: ./timoni/podinfo
run: |
cue fmt ./...
status=$(git status . --porcelain)
[[ -z "$status" ]] || {
echo "CUE files are not correctly formatted"
echo "$status"
git diff
exit 1
}
- name: Validate Timoni module
working-directory: ./timoni/podinfo
run: |
timoni mod lint .
timoni build podinfo . -f debug_values.cue | flux-schema validate --skip-missing-schemas --verbose
- name: Check if working tree is dirty
run: |
if [[ $(git diff --stat) != '' ]]; then
echo 'run make test and commit changes'
exit 1
fi