diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml new file mode 100644 index 0000000..4042293 --- /dev/null +++ b/.github/workflows/build-and-test.yml @@ -0,0 +1,29 @@ +name: Build and Test +on: + pull_request: + branches: [main] + +jobs: + build-and-test: + runs-on: ubuntu-latest + + steps: + - name: Set up Go 1.20.4 + uses: actions/setup-go@v2 + with: + go-version: 1.21.1 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Get dependencies + run: go mod download + + - name: Build + run: go build -v ./... + + - name: Test + run: go test ./... -v