Skip to content

Commit

Permalink
Vet and format blueprints
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Prodan <[email protected]>
  • Loading branch information
stefanprodan committed Dec 18, 2023
1 parent 8e7ad02 commit 324ed83
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ jobs:
- name: Setup CUE
uses: cue-lang/setup-cue@1713281ae501e533ff06108005dffeab9e2e5203 # main
with:
version: v0.6.0
version: v0.7.0
- name: Run tests
run: make test
- name: Run linter
run: make lint-samples
run: make cue-vet
- name: Run setup action
uses: ./actions/setup
- name: Check if working tree is dirty
Expand Down
24 changes: 14 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,24 @@ tidy: ## Tidy Go modules.
fmt: ## Format Go code.
go fmt ./...

cue-fmt: ## Format CUE schemas.
cue fmt ./schemas/...

vet: ## Vet Go code.
go vet ./...

cue-vet: ## Vet CUE schemas.
cue-vet: build ## Vet and fmt CUE files.
cue fmt ./schemas/...
cue vet ./schemas/...

lint-samples: build cue-vet cue-fmt ## Lint the CUE samples.
./bin/timoni mod lint ./examples/minimal
./bin/timoni mod lint ./examples/redis
./bin/timoni mod lint ./cmd/timoni/testdata/module
./bin/timoni mod lint ./internal/engine/testdata/module
for dir in ./blueprints/* ; do
cue fmt $$dir/...
./bin/timoni mod vet $$dir
done
for dir in ./examples/* ; do
cue fmt $$dir/...
if [ $$dir != "./examples/bundles" ]; then
./bin/timoni mod vet $$dir
fi
done
./bin/timoni mod vet ./cmd/timoni/testdata/module
./bin/timoni mod vet ./internal/engine/testdata/module
cue fmt ./internal/engine/testdata/module-values

REDIS_VER=$(shell grep 'tag:' examples/redis/values.cue | awk '{ print $$2 }' | tr -d '"')
Expand Down

0 comments on commit 324ed83

Please sign in to comment.