From 2458c20e90e2c02e397a30d98785e6b9f57935a4 Mon Sep 17 00:00:00 2001 From: Travis Harmon Date: Fri, 6 Jan 2023 09:45:15 -0600 Subject: [PATCH] Fix workflows --- .github/workflows/coverage.yml | 25 +++++++++++++++++++++++++ .github/workflows/test.yml | 6 ++---- 2 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/coverage.yml diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 0000000..602279c --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,25 @@ +on: + push: + branches: + - main +name: Test +jobs: + test: + strategy: + matrix: + go-version: [1.18] + platform: [ubuntu-latest] + runs-on: ${{ matrix.platform }} + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + steps: + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + - name: Checkout code + uses: actions/checkout@v2 + - name: Run coverage + run: go test -race -coverprofile=coverage.out -covermode=atomic + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f7944e8..2aff47f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -on: [push, pull_request] +on: [pull_request] name: Test jobs: test: @@ -17,6 +17,4 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: Run coverage - run: go test -race -coverprofile=coverage.out -covermode=atomic - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v2 + run: go test -race