Skip to content

Commit

Permalink
Enable unit tests on PRs and add gosec (#2)
Browse files Browse the repository at this point in the history
* Enable unit tests on PRs and add gosec

Signed-off-by: Jonathan West <[email protected]>

* Update golangcilint action

Signed-off-by: Jonathan West <[email protected]>

---------

Signed-off-by: Jonathan West <[email protected]>
  • Loading branch information
jgwest authored Jan 23, 2024
1 parent f813ab4 commit 0ceb485
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ on:
- "main"
pull_request:
branches:
- "main"
- '*'

env:
GOLANG_VERSION: '1.21'

Expand All @@ -27,7 +28,7 @@ jobs:

- name: Unit tests running
run: |
go test -v ./...
make test
linting:
Expand All @@ -45,6 +46,7 @@ jobs:
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --verbose --timeout 6m

build:
Expand All @@ -61,4 +63,16 @@ jobs:

- name: Build creation
run: |
go build -v
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: ./...
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ plugin-bin/
# static
server/static/*
!server/static/.gitkeep
cover.out

0 comments on commit 0ceb485

Please sign in to comment.