From bb2758edc50697b37c367b4db1db77b4f25846fb Mon Sep 17 00:00:00 2001 From: Lincoln Clarete Date: Mon, 6 May 2024 21:51:58 -0400 Subject: [PATCH] chore: run go tests on github actions --- .github/workflows/go.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..3b42d54 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,34 @@ +name: Go + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + go-version: [ '1.19', '1.20', '1.21.x' ] + + steps: + - uses: actions/checkout@v4 + - name: Setup Go ${{ matrix.go-version }} + uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go-version }} + # You can test your matrix by printing the current Go version + - name: Display Go version + run: go version + - name: Install dependencies + working-directory: ./go + run: go get . + - name: Generate + working-directory: ./go + run: go generate -v ./... + - name: Build + working-directory: ./go + run: go test -v ./...