Skip to content

Introduce static code analysis #99

Introduce static code analysis

Introduce static code analysis #99

Workflow file for this run

name: Build and Test CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
pull-requests: read
actions: read
concurrency:
group: build-test-ci-${{ github.ref }}-1
cancel-in-progress: true
jobs:
go-build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Build
run: make build
- name: Test
run: make test
go-analyse:
needs: go-build-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Docker cache
uses: ScribeMD/[email protected]
with:
key: docker-${{ runner.os }}-${{ hashFiles('Makefile') }}}
- name: Lint
run: make lint
- name: Gosec
run: make gosec
- uses: nick-fields/retry@v2
with:
timeout_minutes: 5
max_attempts: 3
command: make nilcheck
- name: Vulncheck
run: make vulncheck
docker-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache Docker images.
uses: ScribeMD/[email protected]
with:
key: docker-${{ runner.os }}-${{ hashFiles('Dockerfile') }}
- name: Build the Docker image
run: make docker-build