From 7e2ca94117910cdca8ba3edb0453b030c6754143 Mon Sep 17 00:00:00 2001 From: Jonathan West Date: Tue, 23 Jan 2024 11:01:06 -0500 Subject: [PATCH] Enable unit tests on PRs and add gosec Signed-off-by: Jonathan West --- .github/workflows/main.yml | 19 ++++++++++++++++--- .gitignore | 1 + 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 497982e..a57b567 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,8 @@ on: - "main" pull_request: branches: - - "main" + - '*' + env: GOLANG_VERSION: '1.21' @@ -27,7 +28,7 @@ jobs: - name: Unit tests running run: | - go test -v ./... + make test linting: @@ -61,4 +62,16 @@ jobs: - name: Build creation run: | - go build -v \ No newline at end of file + make build + + gosec: + runs-on: ubuntu-latest + env: + GO111MODULE: on + steps: + - name: Checkout Source + uses: actions/checkout@v3 + - name: Run Gosec Security Scanner + uses: securego/gosec@master + with: + args: ./... \ No newline at end of file diff --git a/.gitignore b/.gitignore index f8d3cc7..45ae47d 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ plugin-bin/ # static server/static/* !server/static/.gitkeep +cover.out