feat: support go database client #446
This file contains hidden or 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: Go | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - 'rel/*' | |
| pull_request: | |
| branches: | |
| - main | |
| - 'rel/*' | |
| # allow manually run the action: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [macos-latest, ubuntu-latest, windows-latest] | |
| go: ['1.20', 'stable'] | |
| exclude: | |
| - os: macos-latest | |
| go: '1.20' | |
| steps: | |
| - name: Check out code into the Go module directory | |
| uses: actions/checkout@v6 | |
| - name: Set up Go ${{ matrix.go }} | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| - name: Get dependencies | |
| run: | | |
| go get -v -t -d ./... && go mod vendor | |
| - name: Install curl on Ubuntu | |
| if: matrix.os == 'ubuntu-latest' | |
| run: sudo apt-get update && sudo apt-get install -y curl | |
| - name: Install curl on Windows | |
| if: matrix.os == 'windows-latest' | |
| run: choco install curl -y | |
| - name: Build | |
| run: | | |
| make generate | |
| go build -v ./... | |
| - name: Test | |
| run: make test |