name: Test and Build on: pull_request: branches: [ "main" ] push: branches: [ "main" ] jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up Go uses: actions/setup-go@v4 with: go-version: '1.22' - name: Run tests run: go test ./... build: runs-on: ubuntu-latest needs: test steps: - uses: actions/checkout@v4 - name: Set up Go uses: actions/setup-go@v4 with: go-version: '1.22' - name: Build run: go build -v ./...