Merge pull request #232 from kubearmor/renovate/github.com-kubearmor-… #20
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
name: ci-go | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
go-build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v2 | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: "v1.20" | |
- name: Build karmor | |
run: make | |
go-fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v2 | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: "v1.20" | |
- name: Check gofmt | |
run: make gofmt | |
go-sec: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v2 | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: "v1.20" | |
- name: Run Gosec Security Scanner | |
run: make gosec | |
go-lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v2 | |
- name: Run Revive Action by pulling pre-built imag | |
uses: morphy2k/revive-action@v2 | |
with: | |
path: "./..." | |
unit-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v2 | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: "v1.20" | |
- name: Run unit tests | |
run: make test | |