From b096b8d8ac0f98f0eebf715265d645df2394fcfc Mon Sep 17 00:00:00 2001 From: kerelape Date: Sat, 7 Oct 2023 19:32:59 +0500 Subject: [PATCH] Update and rename go.yml to coverage.yml --- .github/workflows/coverage.yml | 26 ++++++++++++++++++++++++++ .github/workflows/go.yml | 33 --------------------------------- 2 files changed, 26 insertions(+), 33 deletions(-) create mode 100644 .github/workflows/coverage.yml delete mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 0000000..31a5c18 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,26 @@ +name: coverage +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +jobs: + code-coverage: + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 2 + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: '1.20' + - name: Test profile + run: go test ./... -race -coverprofile=coverage.out -covermode=atomic + - name: Upload profile + uses: codecov/codecov-action@v3 + diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml deleted file mode 100644 index f21437e..0000000 --- a/.github/workflows/go.yml +++ /dev/null @@ -1,33 +0,0 @@ -# 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@v3 - - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: '1.20' - - - name: Build - run: go build -v ./... - - - name: Test - run: go test -v ./... - - - name: Staticcheck - uses: dominikh/staticcheck-action@v1.3.0 - with: - version: "2023.1.5" - install-go: false