diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 1fd59f1..f5ce7dd 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,2 +1,3 @@ -# These owners will be the default owners for everything in the repo. -* @go-vela/admins \ No newline at end of file +# These owners will be the default owners for everything in the repo + +* @go-vela/admins diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 4b017d8..4832bf0 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -73,6 +73,7 @@ cd $HOME/go-vela/vela-k6 - Run the repository code (ensures your changes perform as you desire): - Ensure the appropriate environment variables are set (`PARAMETER_SCRIPT_PATH`, optionally `PARAMETER_OUTPUT_PATH`, `PARAMETER_PROJEKTOR_COMPAT_MODE`, and `PARAMETER_FAIL_ON_THRESHOLD_BREACH`) + ```bash # execute the `start` target with `make` make start diff --git a/.github/README.md b/.github/README.md index f8cf635..321464b 100644 --- a/.github/README.md +++ b/.github/README.md @@ -25,10 +25,10 @@ Please see our [support](SUPPORT.md) documentation for further instructions. ## Copyright and License -``` +```text Copyright (c) 2023 Target Brands, Inc. ``` The Grafana Labs Marks are trademarks of Grafana Labs, and are used with Grafana Labs’ permission. We are not affiliated with, endorsed or sponsored by Grafana Labs or its affiliates. -[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) \ No newline at end of file +[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index fcbfd87..768784c 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -34,12 +34,19 @@ jobs: full-review: runs-on: ubuntu-latest - container: - image: golang:1.21@sha256:ec457a2fcd235259273428a24e09900c496d0c52207266f96a330062a01e3622 + steps: - name: clone uses: actions/checkout@v3 + - name: install go + uses: actions/setup-go@v4 + with: + # use version from go.mod file + go-version-file: "go.mod" + cache: true + check-latest: true + - name: golangci-lint uses: reviewdog/action-golangci-lint@v2 with: diff --git a/DOCS.md b/DOCS.md index eb1ffb3..3fdea71 100644 --- a/DOCS.md +++ b/DOCS.md @@ -1,10 +1,10 @@ -## Description +# Description This plugin uses [Grafana k6](https://k6.io/) to run performance tests in a Vela pipeline. -Source Code: https://github.com/go-vela/vela-k6 +Source Code: -Registry: https://hub.docker.com/r/target/vela-k6 +Registry: ## Usage diff --git a/Makefile b/Makefile index 8526567..d22be01 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,7 @@ LD_FLAGS = -X github.com/go-vela/vela-k6/version.Commit=${GITHUB_SHA} -X github. deps: go-tidy golangci-lint ## Install golang dependencies for the application .PHONY: check -check: go-tidy check-all golangci-lint ## Run all lint checks +check: go-tidy check-all lint-all ## Run all lint checks .PHONY: clean clean: clean-all go-tidy ## Clean up the application and test output @@ -66,6 +66,9 @@ check-all: @go vet ./... @go fmt ./... +.PHONY: lint-all +lint-all: golangci-lint mdl + .PHONY: clean-all clean-all: @rm -f perf-test.json @@ -95,6 +98,16 @@ endif @golangci-lint run ./... @echo finished running golangci-lint +.PHONY: mdl +mdl: +ifeq ($(strip $(shell which mdl)),) +ifneq ($(strip $(shell which gem)),) + @gem install mdl +endif +endif + @mdl -g --rules ~MD007,~MD013 . + @echo finished running mdl + # The `build-all` target is intended to compile # the Go source code into a binary. #