-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #110 from ripienaar/109
(#109) Support signing tasks before storing
- Loading branch information
Showing
16 changed files
with
374 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ jobs: | |
test: | ||
strategy: | ||
matrix: | ||
go: [ 1.18, 1.19 ] | ||
go: ["1.19", "1.20" ] | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
name: build_tasks | ||
description: Choria Build Tasks | ||
|
||
commands: | ||
- name: dependencies | ||
type: parent | ||
description: Manage dependencies | ||
aliases: [d] | ||
commands: | ||
- name: update | ||
description: Update dependencies | ||
type: exec | ||
aliases: [up] | ||
dir: "{{ AppDir }}" | ||
flags: | ||
- name: verbose | ||
description: Log verbosely | ||
short: v | ||
bool: true | ||
- name: proxy | ||
description: Enable using go proxy | ||
bool: true | ||
default: "true" | ||
script: | | ||
. "{{ BashHelperPath }}" | ||
|
||
ab_announce Updating all dependencies | ||
echo | ||
|
||
{{ if eq .Flags.proxy false }} | ||
export GOPROXY=direct | ||
ab_say Disabling go mod proxy | ||
{{ end }} | ||
|
||
go get -u -n -a -t {{- if .Flags.verbose }} -d -x {{ end }} ./... | ||
|
||
ab_say Running go mod tidy | ||
|
||
go mod tidy | ||
|
||
- name: test | ||
type: parent | ||
aliases: [t] | ||
description: Perform various tests | ||
commands: | ||
- name: unit | ||
type: exec | ||
description: Run ginkgo unit tests | ||
aliases: [u] | ||
arguments: | ||
- name: dir | ||
description: Directory to test | ||
default: . | ||
flags: | ||
- name: update | ||
description: Updates the ginkgo runtime | ||
bool: true | ||
script: | | ||
set -e | ||
|
||
. "{{ BashHelperPath }}" | ||
|
||
{{ if .Flags.update }} | ||
ab_say Updating ginkgo binary | ||
go install github.com/onsi/ginkgo/v2/ginkgo | ||
{{ end }} | ||
|
||
ginkgo -r --skip Integration {{ .Arguments.dir | escape }} | ||
|
||
- name: integration | ||
type: exec | ||
dir: "{{ AppDir }}" | ||
aliases: [i] | ||
description: Run ginkgo integration tests | ||
command: ginkgo -r integration | ||
|
||
- name: lint | ||
type: exec | ||
dir: "{{ AppDir }}" | ||
flags: | ||
- name: vet | ||
description: Perform go vet | ||
bool: true | ||
default: true | ||
- name: staticcheck | ||
description: Perform staticcheck | ||
bool: true | ||
default: true | ||
- name: update | ||
description: Updates lint dependencies | ||
bool: true | ||
script: | | ||
set -e | ||
|
||
. "{{ BashHelperPath }}" | ||
|
||
{{ if .Flags.update }} | ||
ab_say Updating linting tools | ||
go install github.com/client9/misspell/cmd/misspell@latest | ||
go install honnef.co/go/tools/cmd/staticcheck@latest | ||
{{ else }} | ||
echo ">>> Run with --update to install required commands" | ||
echo | ||
{{ end }} | ||
|
||
ab_say Formatting source files | ||
go fmt ./... | ||
|
||
ab_say Tidying go mod | ||
go mod tidy | ||
|
||
ab_say Checking spelling | ||
find . -type f -name "*.go" | xargs misspell -error -locale US -i flavour | ||
find docs/content -type f -name "*.md" | xargs misspell -error -locale US | ||
|
||
{{ if .Flags.vet }} | ||
ab_say Performing go vet | ||
go vet ./... | ||
{{ end }} | ||
|
||
{{ if .Flags.staticcheck }} | ||
ab_say Running staticcheck | ||
staticcheck ./... | ||
{{ end }} | ||
|
||
- name: docs | ||
type: parent | ||
description: Documentation related commands | ||
commands: | ||
- name: serve | ||
description: Serves documentation locally | ||
type: exec | ||
dir: "{{ AppDir }}" | ||
flags: | ||
- name: port | ||
description: The port to listen on | ||
default: "8081" | ||
command: hugo serve -p {{ .Flags.port }} -s docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.