github.com/kotalco/kotal@v0.3.0/.github/workflows/go.yml (about)

     1  name: Go build and test
     2  
     3  on:
     4    push:
     5      branches: [master]
     6    pull_request:
     7      branches: [master]
     8  
     9  env:
    10    K8S_VERSION: 1.23.3
    11  
    12  jobs:
    13    build:
    14      runs-on: ubuntu-latest
    15      steps:
    16        - name: Clone repo
    17          uses: actions/checkout@v3
    18  
    19        - name: Set up Go
    20          uses: actions/setup-go@v3
    21          with:
    22            go-version: 1.21
    23  
    24        - name: Build
    25          run: go build -v ./...
    26  
    27        - name: Download envtest binaries
    28          run: |
    29            curl -sSLo envtest-bins.tar.gz "https://go.kubebuilder.io/test-tools/${K8S_VERSION}/$(go env GOOS)/$(go env GOARCH)"
    30            sudo tar -vxzf envtest-bins.tar.gz -C /usr/local/
    31  
    32        - name: Test
    33          run: go test -v ./...