File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,14 +35,37 @@ jobs:
3535 - name : Checkout Git Repository
3636 uses : actions/checkout@v3
3737
38- - name : Unit Tests with Code Coverage
38+ - name : Run Go Tests
39+ run : make test
40+
41+ - name : Check format
3942 run : |
40- make test
43+ if [[ $(go fmt `go list ./... | grep -v vendor`) ]]; then
44+ echo "not well formatted sources are found"
45+ exit 1
46+ fi
4147
42- - name : Upload Code Coverage Report
43- uses : codecov/codecov-action@v3
48+ - name : Generate coverage report
49+ run : |
50+ go test `go list ./... | grep -v examples` -coverprofile=coverage.txt -covermode=atomic
51+
52+ - name : Upload coverage report
53+ uses : codecov/codecov-action@v1
54+ with :
55+ file : ./coverage.txt
56+ flags : unittests
57+ name : codecov-umbrella
58+
59+ - name : Get code coverage artifiact
60+ uses : actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
61+ with :
62+ name : code-coverage
63+ - name : Get test result artifact
64+ uses : actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
65+ with :
66+ name : test-results
67+ path : test-results
68+ - name : Upload code coverage information to codecov.io
69+ uses : codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
4470 with :
45- token : ${{ secrets.CODECOV_TOKEN }}
46- file : cover.out
47- verbose : true
48- fail_ci_if_error : true
71+ file : coverage.out
You can’t perform that action at this time.
0 commit comments