From 7e234584154b3d6a8c524a16aaf9e18ace5057bc Mon Sep 17 00:00:00 2001 From: ain ghazal Date: Fri, 19 Apr 2024 20:44:15 +0200 Subject: [PATCH] lint and run tests --- .github/workflows/test.yml | 45 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..4dff894 --- /dev/null +++ b/.github/workflows/test.yml @@ -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 ./...'