| 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] |
| steps: |
| |
| - name: Set up Go 1.x |
| uses: actions/setup-go@v3 |
| with: |
| go-version: ^1.13 |
| |
| - name: Check out code into the Go module directory |
| uses: actions/checkout@v3 |
| |
| - name: Get dependencies |
| run: | |
| go get -v -t -d ./... |
| |
| - name: Build |
| run: go build -v ./... |
| |
| - name: Test |
| run: make test |