| 1 |
name: CI |
| 2 |
on: |
| 3 |
push: |
| 4 |
branches: |
| 5 |
- main |
| 6 |
pull_request: |
| 7 |
branches: |
| 8 |
- main |
| 9 |
jobs: |
| 10 |
test: |
| 11 |
runs-on: ubuntu-latest |
| 12 |
env: |
| 13 |
GO111MODULE: on |
| 14 |
steps: |
| 15 |
- name: Setup go |
| 16 |
uses: actions/setup-go@v5 |
| 17 |
- name: Checkout Source |
| 18 |
uses: actions/checkout@v4 |
| 19 |
- uses: actions/cache@v4 |
| 20 |
with: |
| 21 |
path: ~/go/pkg/mod |
| 22 |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} |
| 23 |
restore-keys: | |
| 24 |
${{ runner.os }}-go- |
| 25 |
- name: Check Formating |
| 26 |
run: make fmt |
| 27 |
- name: Checks basic sanity |
| 28 |
run: make vet |
| 29 |
- name: Check lint warnings |
| 30 |
uses: golangci/golangci-lint-action@v7 |
| 31 |
- name: Check static security |
| 32 |
uses: securego/gosec@master |
| 33 |
with: |
| 34 |
args: ./... |
| 35 |
- name: Check dependencies vulnerabilities |
| 36 |
run: make govulncheck |
| 37 |
- name: Run unit and fuzz tests |
| 38 |
run: make test |