Skip to content

Commit

Permalink
Merge pull request #2 from kevincobain2000/feature/coveritup
Browse files Browse the repository at this point in the history
Feature/coveritup
  • Loading branch information
kevincobain2000 authored Oct 22, 2023
2 parents a3aa944 + 8159dcf commit 7ad2cc9
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 77 deletions.
82 changes: 82 additions & 0 deletions .github/workflows/coveritup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
on: [push, pull_request]
name: Cover It Up
jobs:
coveritup:
strategy:
matrix:
go-version: [latest]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: kevincobain2000/action-gobrew@v2
with:
version: ${{ matrix.go-version }}

- name: Install Tools
run: |
go install github.com/securego/gosec/v2/cmd/gosec@latest
go install github.com/axw/gocov/gocov@latest
go install github.com/AlekSi/gocov-xml@latest
- name: Test
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: |
go tool cover -html=coverage.out -o coverage.html
gocov convert coverage.out | gocov-xml > coverage.xml
- name: Build
run: |
BUILD_START=$SECONDS
go build -ldflags '-s -w' -o main main.go
echo SCORE=$(($SECONDS-BUILD_START)) >> "$GITHUB_ENV"
- uses: kevincobain2000/action-coveritup@v1
with:
type: build-time

- name: Coveritup
run: |
curl -sLk https://raw.githubusercontent.com/kevincobain2000/cover-totalizer/master/install.sh | sh
echo SCORE=`./cover-totalizer coverage.xml` >> "$GITHUB_ENV"
- uses: kevincobain2000/action-coveritup@v1
with:
type: coverage

- name: Go Binary Size
run: |
echo SCORE=`du -sk main | awk '{print $1}'` >> "$GITHUB_ENV"
- uses: kevincobain2000/action-coveritup@v1
with:
type: go-binary-size

- name: Number of dependencies
run: |
echo SCORE=`go list -m all|wc -l|awk '{$1=$1};1'` >> "$GITHUB_ENV"
- uses: kevincobain2000/action-coveritup@v1
with:
type: go-mod-dependencies

- name: Number of GO Sec issues
run: |
echo SCORE=`gosec -no-fail --quiet ./...|grep Issues | tail -1 |awk '{print $3}'` >> "$GITHUB_ENV"
- uses: kevincobain2000/action-coveritup@v1
with:
type: go-sec-issues

- uses: kevincobain2000/action-coveritup@v1
with:
pr_comment: true

- uses: kevincobain2000/action-camo-purge@v1
27 changes: 0 additions & 27 deletions .github/workflows/golint.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/gosec.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/gotest.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![codecov](https://codecov.io/gh/kevincobain2000/go-app-reviews-scraper/branch/master/graph/badge.svg)](https://codecov.io/gh/kevincobain2000/go-app-reviews-scraper)



<p align="center">
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/kevincobain2000/go-app-reviews-scraper

go 1.18
go 1.21

require (
github.com/JohannesKaufmann/html-to-markdown v1.3.4
Expand Down

0 comments on commit 7ad2cc9

Please sign in to comment.