diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 4d5dbdc..efda44d 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -24,41 +24,4 @@ jobs: - name: Run unit tests and coverage test id: test-coverage run: | - go test -cover -v > output.txt - - - name: Transform output - id: results - if: always() - run: | - CONTENT=$(cat output.txt) - CONTENT="${CONTENT//'%'/'%25'}" - CONTENT="${CONTENT//$'\n'/'%0A'}" - CONTENT="${CONTENT//$'\r'/'%0D'}" - echo "::set-output name=content::$CONTENT" - - comment: - runs-on: ubuntu-latest - if: github.event_name != 'push' - needs: coverage - steps: - - name: Add Comment - uses: actions/github-script@v5 - if: always() - with: - script: | - const output = `### Unit Tests and Coverage -
Show Output - - \`\`\` - ${{ needs.coverage.outputs.msg }} - \`\`\` -
- - *Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`*`; - - await github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: output - }) + go test -cover -v diff --git a/govultr_test.go b/govultr_test.go index f8beaa4..690de62 100644 --- a/govultr_test.go +++ b/govultr_test.go @@ -141,9 +141,7 @@ func TestClient_DoWithContextError(t *testing.T) { panicked = fmt.Sprint(err) } }() - if err := client.DoWithContext(context.Background(), req, nil); err != nil { - t.Errorf("dowithcontext error: %s", err) - } + client.DoWithContext(context.Background(), req, nil) //nolint:all }() if panicked != "" { t.Errorf("unexpected panic: %s", panicked)