Skip to content

Commit

Permalink
feat: use bash shell for github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
juev committed Dec 7, 2023
1 parent e686093 commit 01a10fa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@ jobs:

- name: Go version
run: go version
shell: bash
- name: Build
run: go build cmd/gobrew/main.go
shell: bash
8 changes: 7 additions & 1 deletion .github/workflows/coveritup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ jobs:
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
shell: bash
- name: Test
run: |
BUILD_START=$SECONDS
go test -race -v ./... -count=1 -coverprofile=coverage.out
echo SCORE=$(($SECONDS-BUILD_START)) >> "$GITHUB_ENV"
shell: bash
- uses: kevincobain2000/action-coveritup@v1
with:
type: unit-test-run-time
Expand All @@ -49,6 +50,7 @@ jobs:
BUILD_START=$SECONDS
go build -ldflags '-s -w' -o main cmd/gobrew/main.go
echo SCORE=$(($SECONDS-BUILD_START)) >> "$GITHUB_ENV"
shell: bash

- uses: kevincobain2000/action-coveritup@v1
with:
Expand All @@ -58,6 +60,7 @@ jobs:
run: |
curl -sLk https://raw.githubusercontent.com/kevincobain2000/cover-totalizer/master/install.sh | sh
echo SCORE=`./cover-totalizer coverage.xml` >> "$GITHUB_ENV"
shell: bash

- uses: kevincobain2000/action-coveritup@v1
with:
Expand All @@ -66,6 +69,7 @@ jobs:
- name: Go Binary Size
run: |
echo SCORE=`du -sk main | awk '{print $1}'` >> "$GITHUB_ENV"
shell: bash

- uses: kevincobain2000/action-coveritup@v1
with:
Expand All @@ -74,6 +78,7 @@ jobs:
- name: Number of dependencies
run: |
echo SCORE=`go list -m all|wc -l|awk '{$1=$1};1'` >> "$GITHUB_ENV"
shell: bash

- uses: kevincobain2000/action-coveritup@v1
with:
Expand All @@ -82,6 +87,7 @@ jobs:
- name: Number of GO Sec issues
run: |
echo SCORE=`gosec -no-fail --quiet ./...|grep Issues | tail -1 |awk '{print $3}'` >> "$GITHUB_ENV"
shell: bash

- uses: kevincobain2000/action-coveritup@v1
with:
Expand Down

0 comments on commit 01a10fa

Please sign in to comment.