chore: support approval flow (#78) #264
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 | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
jobs: | |
golangci: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: 1.23.2 | |
- run: go generate ./... | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.60.2 | |
args: --verbose --timeout 20m --max-same-issues=30 --allow-parallel-runners | |
go-tidy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: 1.23.2 | |
- name: Verify tidy | |
run: | | |
go mod tidy | |
git diff --exit-code | |
go-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: 1.23.2 | |
- uses: hashicorp/setup-terraform@v2 | |
with: | |
terraform_version: "1.3.*" | |
terraform_wrapper: false | |
- run: | | |
go generate ./... | |
go test -v -cover ./... | |
env: | |
TF_ACC: "1" | |
# Test uses mock service, and any value should work | |
BYTEBASE_SERVICE_ACCOUNT: "[email protected]" | |
BYTEBASE_SERVICE_KEY: "12345" | |
BYTEBASE_URL: "https://bytebase.example.com" |