feat: Enhance CI workflow and update .gitignore for open source stand… #19
Workflow file for this run
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: Build, Test, Benchmark, and Security Check | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.23.x' | |
- name: Install dependencies | |
run: go get ./... | |
- name: Build | |
run: make build ARGS="-v" | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.23.x' | |
- name: Install dependencies | |
run: go get ./... | |
- name: Test | |
run: make test | |
benchmark: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.23.x' | |
- name: Install dependencies | |
run: go get ./... | |
- name: Run benchmarks | |
run: go test -bench ./... | |
security: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.23.x' | |
- name: Install dependencies | |
run: go get ./... | |
- name: Install gosec | |
run: go install github.com/securego/gosec/v2/cmd/gosec@latest | |
- name: Run security checks | |
run: gosec ./... | |
- name: Run govulncheck | |
run: go install golang.org/x/vuln/cmd/govulncheck@latest && govulncheck ./... |