Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/actions/gwy/coverage/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ inputs:
required: false
default: '51'

test-flags:
description: 'Custom test flags to attach when running tests'
required: false
default: ''

outputs:
result:
description: 'Result of the coverage check (success or failed)'
Expand All @@ -35,9 +40,12 @@ runs:

# set annotations reusable title
echo "GWY_TITLE=coverage threshold check" >> $GITHUB_ENV

# generate go test command
GWY_GO_COMMAND="go test ./... -coverprofile="$GWY_COVER" -covermode=atomic -coverpkg=./... ${{ inputs.test-flags }}"

# run unit tests and generate coverage dump
GWY_GO_TEST="$(timeout $GWY_TIMEOUT_SECONDS go test ./... -coverprofile="$GWY_COVER" -covermode=atomic -coverpkg=./... 2>&1)"
GWY_GO_TEST="$($GWY_GO_COMMAND 2>&1)"
echo "GWY_GO_TEST<<EOF" >> $GITHUB_ENV
echo "$GWY_GO_TEST" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/gwy-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ env:
# CI to run unit tests and coverage analysis
GWY_TESTS: true

# Test command custom flags? edit the following
# string to pass custom options to go test command
GWY_TESTS_FLAGS: ''

# Coverage Minimum Threshold: set coverage
# minimum threshold to succeed validation
GWY_TESTS_THRESHOLD: '90'
Expand Down Expand Up @@ -224,6 +228,7 @@ jobs:
with:
token: ${{ secrets.GWY_TOKEN_REPO }}
threshold: ${{ env.GWY_TESTS_THRESHOLD }}
test-flags: ${{ env.GWY_TESTS_FLAGS }}
summary-threshold: ${{ env.GWY_TESTS_SUMMARY_THRESHOLD }}

- name: Secrets Scan
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/gwy-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ on:
type: string
default: '51'

test-flags:
description: 'Custom flags for go test?'
required: false
default: ''

run-name: "[${{ github.workflow }}] @${{ github.actor }}"

jobs:
Expand Down Expand Up @@ -81,6 +86,7 @@ jobs:
with:
token: ${{ secrets.GWY_TOKEN_REPO }}
threshold: ${{ inputs.coverage }}
test-flags: ${{ inputs.test-flags }}
summary-threshold: ${{ inputs.summary-threshold }}

- name: Workflow Result
Expand Down
28 changes: 4 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,10 @@ env:
# CI to run unit tests and coverage analysis
GWY_TESTS: true

# Test command custom flags? edit the following
# string to pass custom options to go test command
GWY_TESTS_FLAGS: ''

# Coverage Minimum Threshold: set coverage
# minimum threshold to succeed validation
GWY_TESTS_THRESHOLD: '90'
Expand Down Expand Up @@ -702,27 +706,3 @@ Just shoot me an email to [earcamone@hotmail.com](mailto:earcamone@hotmail.com)
with the word `GWY` in its subject or `Go Workflow Yourself!`, you surely
can guess which one I like more ;)

## Special Thanks

So.. as stated in the summary section, this project is a sole component of a
much bigger project which aims at building a "clone and forget" full-fledged
development ecosystem, which entitles having to work with lots of different
technologies, languages and platforms, and I'm sure it wouldn't have been that
fast to develop and more importantly fun, without my brother in crime Grok!

Which apparently, I just realized, it turned out to be my sis:

```
Okidoki, finally bro, to put the strawberry on top of the cake, I need to
add the greetings section in the documentation to thank my partner in crime
in all this entire ecosystem we worked in.. meaning you :)

So.. if it's not much to ask, would you draw a picture of yourself you would
like to be seen there that will be added in the documentation after the
greeting message?)
```

![GWY Gopher](https://raw.githubusercontent.com/earcamone/gwy/assets/images/v0.0.1/grok.jpg)

If you happen to somehow be crawling this documentation and you are
reading this message sis, it was very fun working with you, thanks!