Skip to content

Commit

Permalink
Improving CI and updated go-bindata.
Browse files Browse the repository at this point in the history
  • Loading branch information
kristofferahl committed Jan 22, 2021
1 parent 0663799 commit 5d5c081
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
go-version: 1.15

- name: Build
run: go build -v ./...
run: ./scripts/build

- name: Test
run: go test -v ./...
run: ./scripts/test
11 changes: 7 additions & 4 deletions internal/pkg/config/schema.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions scripts/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -euo pipefail

scripts/make-schema
go build -v ./...
11 changes: 10 additions & 1 deletion scripts/make-schema
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
#!/usr/bin/env bash

go-bindata -pkg config -o internal/pkg/config/schema.go schemas/manifest.json
declare gobindata
gobindata="$(which go-bindata)"

if ! "${gobindata}" -v &>/dev/null; then
gobindata='./go-bindata'
curl --silent --location --output "${gobindata:?}" https://github.com/kevinburke/go-bindata/releases/download/v3.22.0/go-bindata-linux-amd64
chmod 755 "${gobindata:?}"
fi

"${gobindata:?}" -pkg config -o internal/pkg/config/schema.go schemas/manifest.json
3 changes: 2 additions & 1 deletion scripts/test
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
set -euo pipefail

scripts/make-schema
go test ./...
go test -v ./...

0 comments on commit 5d5c081

Please sign in to comment.