Skip to content

Commit

Permalink
Merge pull request #116 from kevincobain2000/develop
Browse files Browse the repository at this point in the history
CI Github Actions. 
Only CI changes.
  • Loading branch information
kevincobain2000 committed Aug 22, 2023
2 parents 95a341a + ee5aeb4 commit 0241c56
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
on: [push, pull_request]
name: CI
jobs:
test:
build:
strategy:
matrix:
go-version: [latest, dev-latest, mod]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: kevincobain2000/action-gobrew@v2
- uses: kevincobain2000/action-gobrew@v2.2
with:
version: ${{ matrix.go-version }}

Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/coveritup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
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@v2
- uses: kevincobain2000/action-gobrew@v2.2
with:
version: ${{ matrix.go-version }}

- name: Install Tools
run: |
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

- name: Coverage
run: |
go tool cover -html=coverage.out -o coverage.html
gocov convert coverage.out | gocov-xml > coverage.xml
- name: Build
run: go build -ldflags '-s -w' -o main cmd/gobrew/main.go

# Coveritup
- 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

- uses: kevincobain2000/action-coveritup@v1
with:
pr_comment: true
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
on: [push, pull_request]
on: [pull_request]
name: CI
jobs:
test:
Expand All @@ -9,7 +9,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: kevincobain2000/action-gobrew@v2
- uses: kevincobain2000/action-gobrew@v2.2
with:
version: ${{ matrix.go-version }}
- name: Test
Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@

# Build Status

| Branch | Status |
| :------ | :----------------------------------------------------------------------------------------- |
| master | ![Test](https://github.com/kevincobain2000/gobrew/workflows/Test/badge.svg?branch=master) |
| develop | ![Test](https://github.com/kevincobain2000/gobrew/workflows/Test/badge.svg?branch=develop) |
| Coverage | [![codecov](https://codecov.io/gh/kevincobain2000/gobrew/branch/master/graph/badge.svg)](https://codecov.io/gh/kevincobain2000/gobrew) |
| Branch | Status |
|:----------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| master | ![Test](https://github.com/kevincobain2000/gobrew/workflows/Test/badge.svg?branch=master) |
| Coverage | [![coveritup](https://coveritup.app/embed?org=kevincobain2000&repo=gobrew&branch=master&type=coverage)](https://coveritup.app/kevincobain2000/gobrew) |
| Binary Size | [![coveritup](https://coveritup.app/embed?org=kevincobain2000&repo=gobrew&branch=master&type=go-binary-size)](https://coveritup.app/kevincobain2000/gobrew) |
| Mod Dependecies | [![coveritup](https://coveritup.app/embed?org=kevincobain2000&repo=gobrew&branch=master&type=go-mod-depdendencies)](https://coveritup.app/kevincobain2000/gobrew) |



## Install or update
Expand Down Expand Up @@ -248,7 +250,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: kevincobain2000/action-gobrew@v2.1
- uses: kevincobain2000/action-gobrew@v2.2
with:
version: ${{ matrix.go-version }}

Expand Down

0 comments on commit 0241c56

Please sign in to comment.