Skip to content

Commit

Permalink
(ci) coveritup add time taken by unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincobain2000 committed Sep 16, 2023
1 parent 67cf310 commit b426d86
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/coveritup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@ jobs:
go install github.com/axw/gocov/gocov@latest
go install github.com/AlekSi/gocov-xml@latest
- name: Test
run: go test -race -v ./... -count=1 -coverprofile=coverage.out
run: |
BUILD_START=$SECONDS
go test -race -v ./... -count=1 -coverprofile=coverage.out
echo SCORE=$(($SECONDS-BUILD_START)) >> "$GITHUB_ENV"
- uses: kevincobain2000/action-coveritup@v1
with:
type: unit-test-run-time

- name: Coverage
run: |
Expand All @@ -31,7 +38,6 @@ jobs:
go build -ldflags '-s -w' -o main cmd/gobrew/main.go
echo SCORE=$(($SECONDS-BUILD_START)) >> "$GITHUB_ENV"
# Coveritup - Start
- uses: kevincobain2000/action-coveritup@v1
with:
type: build-time
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@
# Build Status

| Branch | Status |
|:----------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------|
| :-------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------ |
| master | ![Test](https://github.com/kevincobain2000/gobrew/workflows/Test/badge.svg?branch=master) |
| Coverage | [![coveritup](https://coveritup.app/embed/kevincobain2000/gobrew?branch=master&type=coverage)](https://coveritup.app/kevincobain2000/gobrew) |
| Binary Size | [![coveritup](https://coveritup.app/embed/kevincobain2000/gobrew?branch=master&type=go-binary-size)](https://coveritup.app/kevincobain2000/gobrew) |
| Mod Dependecies | [![coveritup](https://coveritup.app/embed/kevincobain2000/gobrew?branch=master&type=go-mod-dependencies)](https://coveritup.app/kevincobain2000/gobrew) |
| Unit Test Time | [![coveritup](https://coveritup.app/embed/kevincobain2000/gobrew?branch=master&type=unit-test-run-time)](https://coveritup.app/kevincobain2000/gobrew) |
| Average PR Days | [![coveritup](https://coveritup.app/embed/kevincobain2000/gobrew?branch=master&type=average-pr-days)](https://coveritup.app/kevincobain2000/gobrew) |



Expand Down

0 comments on commit b426d86

Please sign in to comment.