From 15d8d2844bba78a27d8d40707cfcecaab32a4f7e Mon Sep 17 00:00:00 2001 From: Yamasaki Shotaro <88176012+seipan@users.noreply.github.com> Date: Fri, 11 Aug 2023 03:38:31 +0900 Subject: [PATCH] Create go.yml --- .github/workflows/go.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 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..282f4e8 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,32 @@ +# This workflow will build a golang project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go + +name: Go + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + + build: + strategy: + matrix: + go-version: ['1.18', '1.19', '1.20'] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: set up Go 1.x + uses: actions/setup-go@v3 + with: + go-version: ${{ matrix.go-version }} + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -race -coverprofile=coverage.txt -covermode=atomic +