Skip to content

ci: [KAN-137] add trivy scan #162

ci: [KAN-137] add trivy scan

ci: [KAN-137] add trivy scan #162

Workflow file for this run

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: build and test
on:
push:
branches: [ "*" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.24'
cache: true
- name: Build All and Test
run: |
for module in common client server; do
echo "Building and testing module: $module"
cd $module
go build -v ./...
go test -v ./...
cd ..
done
lint:
name: Lint(multi-module)
runs-on: ubuntu-latest
strategy:
matrix:
module: [common, client, server]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.24'
cache: true
- name: Run golangci-lint
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9
with:
args: --timeout 5m
working-directory: ${{ matrix.module }}