Skip to content

Commit

Permalink
lint and run tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ainghazal committed Apr 19, 2024
1 parent 13f0851 commit 7e23458
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: test, lint and gosec

env:
GOVERSION: 1.21

on:
push:
branches:
- 'no-masters'
pull_request:
branches:
- 'no-masters'

jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: setup go
uses: actions/setup-go@v5
with:
go-version: '$GOVERSION'
- name: Run short tests
run: go test -cover ./...

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Lint with revive action, from pre-built image
uses: docker://morphy/revive-action:v2
with:
path: "."

gosec:
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- name: Checkout Source
uses: actions/checkout@v4
- name: Run Gosec security scanner
uses: securego/gosec@master
with:
args: '-no-fail ./...'

0 comments on commit 7e23458

Please sign in to comment.