From e0a739a6817288df64578f8579670a63857080e2 Mon Sep 17 00:00:00 2001 From: nanhe Date: Fri, 10 Jun 2022 14:44:19 +0800 Subject: [PATCH] add Action --- .github/workflows/go.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 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..6885e63 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,35 @@ +name: Go CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + build: + runs-on: ubuntu-latest + strategy: + matrix: + go: [1.13, 1.14, 1.15] + + steps: + - name: Set up Go 1.x + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go }} + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Build Tea + run: go build ./tea + - name: Build Util + run: go build ./utils + + - name: Test + run: go test -race -coverprofile=coverage.txt -covermode=atomic ./tea/... ./utils/... + + - name: CodeCov + run: bash <(curl -s https://codecov.io/bash) \ No newline at end of file