From c2abd02a0d57b2fd2afb303fcd1591a1c994ef1c Mon Sep 17 00:00:00 2001 From: miniLCT <920861971@qq.com> Date: Sun, 7 Apr 2024 15:57:23 +0800 Subject: [PATCH] create go yml --- .github/workflows/go.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 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..35a042c --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,31 @@ +# 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: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.18 + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... -coverprofile=coverage.txt -covermode=atomic + + - name: CoverageUpload + run: bash <(curl -s https://codecov.io/bash)