Skip to content

chore: add code build workflow #1

chore: add code build workflow

chore: add code build workflow #1

Workflow file for this run

name: Build
on:
push:
branches:
- main
paths-ignore:
- '**.md'
- 'vulns/**'
- 'LICENSE'
pull_request:
paths-ignore:
- '**.md'
- 'vulns/**'
- 'LICENSE'
env:
GO_VERSION: '1.22'
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout code into the Go module directory
uses: actions/checkout@v4
- name: Tidy
run: |
go mod tidy
if [ -n "$(git status --porcelain)" ]; then
echo "Run 'go mod tidy' and push it"
exit 1
fi
- name: Lint
uses: golangci/[email protected]
with:
version: v1.59
args: --verbose
- name: Test
run: |
go test -v ./...