| 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.25', 'stable'] | |
| steps: | |
| - name: Check out code into the Go module directory | |
| uses: actions/checkout@v7 | |
| - name: Set up Go ${{ matrix.go }} | |
| uses: actions/setup-go@v7 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| - name: Get dependencies | |
| run: | | |
| go mod download | |
| - 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 |