Feat/sixty forty reward split (#916) #2773
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go Test | |
on: push | |
jobs: | |
unit-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
name: Setup GO Env | |
with: | |
go-version: '1.20' | |
- name: Cache Go Test modules | |
uses: actions/cache@v2 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-test-${{ secrets.CACHE_VERSION }}-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go-test- | |
- name: Run Unit Tests with Coverage | |
run: >- | |
for d in $(go list ./... | grep -v e2e); do | |
go test -race -coverprofile=profile.out -covermode=atomic $d | |
if [ -f profile.out ]; then | |
cat profile.out >> coverage.txt | |
rm profile.out | |
fi | |
done | |
shell: bash | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v2 | |
with: | |
fail_ci_if_error: true | |
files: ./coverage.txt | |
flags: unittests | |
name: codecov-umbrella | |
verbose: true |