Skip to content

Commit

Permalink
Merge pull request #97 from k1LoW/logo
Browse files Browse the repository at this point in the history
Add octocov logo
  • Loading branch information
k1LoW authored Oct 27, 2021
2 parents ff15777 + 6086316 commit 7fb2a84
Show file tree
Hide file tree
Showing 27 changed files with 232 additions and 107 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,20 @@ jobs:

- name: Check out source code
uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Run lint
uses: reviewdog/action-golangci-lint@v2

- name: Run tests
run: make ci

- name: Run test_central
if: ${{ github.event_name == 'pull_request' }}
run:
make test_central

- name: Run Trivy vulnerability scanner in repo mode
uses: aquasecurity/trivy-action@master
with:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ BUILD_LDFLAGS = -X $(PKG).commit=$(COMMIT) -X $(PKG).date=$(DATE)

default: test

ci: depsdev test test_central test_no_coverage sec
ci: depsdev test test_no_coverage sec

test:
go test ./... -coverprofile=coverage.out -covermode=count
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<p align="center">
<br>
<img src="https://github.com/k1LoW/octocov/raw/main/docs/logo.png" width="200" alt="octocov">
<br><br>
</p>

# octocov

[![build](https://github.com/k1LoW/octocov/actions/workflows/ci.yml/badge.svg)](https://github.com/k1LoW/octocov/actions) ![coverage](docs/coverage.svg) ![ratio](docs/ratio.svg) ![time](docs/time.svg)
Expand Down
10 changes: 10 additions & 0 deletions central/central.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"time"

"github.com/k1LoW/octocov/gh"
"github.com/k1LoW/octocov/internal"
"github.com/k1LoW/octocov/pkg/badge"
"github.com/k1LoW/octocov/report"
)
Expand Down Expand Up @@ -137,6 +138,9 @@ func (c *Central) generateBadges() ([]string, error) {
}
b := badge.New("coverage", fmt.Sprintf("%.1f%%", cp))
b.MessageColor = c.config.CoverageColor(cp)
if err := b.AddIcon(internal.Icon); err != nil {
return nil, err
}
if err := b.Render(out); err != nil {
return nil, err
}
Expand All @@ -156,6 +160,9 @@ func (c *Central) generateBadges() ([]string, error) {
}
b := badge.New("code to test ratio", fmt.Sprintf("1:%.1f", tr))
b.MessageColor = c.config.CodeToTestRatioColor(tr)
if err := b.AddIcon(internal.Icon); err != nil {
return nil, err
}
if err := b.Render(out); err != nil {
return nil, err
}
Expand All @@ -176,6 +183,9 @@ func (c *Central) generateBadges() ([]string, error) {
}
b := badge.New("test execution time", d.String())
b.MessageColor = c.config.TestExecutionTimeColor(d)
if err := b.AddIcon(internal.Icon); err != nil {
return nil, err
}
if err := b.Render(out); err != nil {
return nil, err
}
Expand Down
9 changes: 9 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@ var rootCmd = &cobra.Command{

b := badge.New("coverage", fmt.Sprintf("%.1f%%", cp))
b.MessageColor = c.CoverageColor(cp)
if err := b.AddIcon(internal.Icon); err != nil {
return err
}
if err := b.Render(out); err != nil {
return err
}
Expand Down Expand Up @@ -240,6 +243,9 @@ var rootCmd = &cobra.Command{

b := badge.New("code to test ratio", fmt.Sprintf("1:%.1f", tr))
b.MessageColor = c.CodeToTestRatioColor(tr)
if err := b.AddIcon(internal.Icon); err != nil {
return err
}
if err := b.Render(out); err != nil {
return err
}
Expand Down Expand Up @@ -284,6 +290,9 @@ var rootCmd = &cobra.Command{
d := time.Duration(*r.TestExecutionTime)
b := badge.New("test execution time", d.String())
b.MessageColor = c.TestExecutionTimeColor(d)
if err := b.AddIcon(internal.Icon); err != nil {
return err
}
if err := b.Render(out); err != nil {
return err
}
Expand Down
Binary file added docs/logo.afdesign
Binary file not shown.
Binary file added docs/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions docs/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/logo_raw.afdesign
Binary file not shown.
22 changes: 12 additions & 10 deletions example/central/badges/k1LoW/awpsec/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 12 additions & 10 deletions example/central/badges/k1LoW/awpsec/ratio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 12 additions & 10 deletions example/central/badges/k1LoW/tbls/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 12 additions & 10 deletions example/central/badges/k1LoW/tbls/ratio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 12 additions & 10 deletions example/central/badges/k1LoW/tbls/time.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 7fb2a84

Please sign in to comment.