From 5f0fd85c8eb106ebf85c2d9742a468006008995d Mon Sep 17 00:00:00 2001 From: Damien Stamates Date: Wed, 28 Aug 2019 22:21:56 -0500 Subject: [PATCH] Move codecov to unit test step --- .github/workflows/build.yml | 49 ++++++++----------------------------- 1 file changed, 10 insertions(+), 39 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 01ac2d6..3acc120 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,13 +21,21 @@ jobs: - name: Test run: go test -v ./... - - name: Send Failure Status + - name: Check for Failure if: failure() env: WEBHOOK_URL: ${{secrets.DISCORD_WEBHOOK}} uses: WalshyDev/Discord-Status-Webhook@v1.0 with: args: "failure" + + - name: Upload Test Coverage + uses: codecov/codecov-action@v1.0.2 + with: + token: ${{secrets.CODECOV_TOKEN}} + file: ./coverage.txt + flags: unittests + name: codecov-quirk build: name: Build @@ -45,33 +53,6 @@ jobs: - name: Build run: go build -v . - - codecov: - name: Code Coverage - needs: test - runs-on: ubuntu-latest - - steps: - - - name: Set up Go 1.12 - uses: actions/setup-go@v1 - with: - go-version: 1.12 - id: go - - - name: Check out code into the Go module directory - uses: actions/checkout@v1 - - - name: Test - run: go test -v -coverprofile=./.github/coverage.txt -covermode=atomic ./... - - - name: Upload Coverage - uses: codecov/codecov-action@v1.0.2 - with: - token: ${{secrets.CODECOV_TOKEN}} - file: ./coverage.txt - flags: unittests - name: codecov-quirk notify: name: Notification @@ -80,19 +61,9 @@ jobs: steps: - - name: Send Build Status + - name: Send Success Status env: WEBHOOK_URL: ${{secrets.DISCORD_WEBHOOK}} uses: WalshyDev/Discord-Status-Webhook@v1.0 with: args: "success" - - - name: Send Failure Status - if: cancelled() - env: - WEBHOOK_URL: ${{secrets.DISCORD_WEBHOOK}} - uses: WalshyDev/Discord-Status-Webhook@v1.0 - with: - args: "failure" - -