-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6d0bc1d
commit 5a8b599
Showing
11 changed files
with
213 additions
and
211 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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Code Scanners | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
env: | ||
GO_VERSION: 1.21 | ||
|
||
|
||
permissions: | ||
contents: read | ||
# Optional: allow read access to pull request. Use with `only-new-issues` option. | ||
# pull-requests: read | ||
|
||
|
||
jobs: | ||
govulncheck_job: | ||
runs-on: ubuntu-latest | ||
name: Run govulncheck | ||
steps: | ||
- id: govulncheck | ||
uses: golang/govulncheck-action@v1 | ||
with: | ||
go-version-input: "1.21.2" | ||
go-package: ./... | ||
security_scan: | ||
runs-on: ubuntu-latest | ||
env: | ||
GO111MODULE: on | ||
steps: | ||
- name: Checkout Source | ||
uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.21.2" | ||
cache: false | ||
- name: Install Task | ||
run: sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d | ||
- name: Installing Go Tools | ||
run: ./bin/task install_tools | ||
- name: Running security scanning | ||
run: ./bin/task security | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: $GO_VERSION | ||
cache: false | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
# Require: The version of golangci-lint to use. | ||
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version. | ||
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit. | ||
version: v1.54 | ||
args: --timeout=30m |
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 |
---|---|---|
|
@@ -6,32 +6,19 @@ on: | |
- master | ||
pull_request: | ||
|
||
env: | ||
GO_VERSION: 1.21.0 | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
go: [ 1.21.0] | ||
grafana: [ 9.4.3, 10.0.0 ] | ||
go: [ $GO_VERSION ] | ||
grafana: [ 8.5.22, 9.4.3, 10.1.4 ] | ||
|
||
env: | ||
GRAFANA_INTEGRATION: 1 | ||
|
||
services: | ||
minio: | ||
image: bitnami/minio:latest | ||
ports: | ||
- 9000:9000 | ||
- 9001:9001 | ||
options: >- | ||
-e GF_AUTH_ANONYMOUS_ENABLED=true -e MINIO_ROOT_USER="test" -e MINIO_ROOT_PASSWORD="secretsss" | ||
grafana: | ||
# Docker Hub image | ||
image: "grafana/grafana:${{ matrix.grafana }}" | ||
ports: | ||
- 3000:3000 | ||
options: >- | ||
-e GF_AUTH_ANONYMOUS_ENABLED=true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -51,16 +38,14 @@ jobs: | |
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Wait for Minio to come up. | ||
run: nc -z -v -w15 127.0.0.1 9000 | ||
- name: Calc coverage | ||
if: "${{ matrix.go == '1.21.0' && matrix.grafana == '9.4.3' }}" | ||
if: "${{ matrix.go == '1.21.0' && matrix.grafana == '10.1.4' }}" | ||
run: | | ||
go test -v -covermode=atomic -coverprofile=coverage.out ./... | ||
- name: Convert coverage.out to coverage.lcov | ||
if: "${{ matrix.go == '1.21.0' && matrix.grafana == '9.4.3' }}" | ||
if: "${{ matrix.go == '1.21.0' && matrix.grafana == '10.1.4' }}" | ||
uses: jandelgado/[email protected] | ||
- name: Test | ||
if: "${{ matrix.grafana != '9.4.3' }}" | ||
if: "${{ matrix.grafana != '10.1.4' }}" | ||
run: go test -v ./... | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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.