Schema testcases fix merge with master #84
Workflow file for this run
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: Test | |
on: | |
pull_request: | |
branches: | |
- master | |
- main | |
paths: | |
- "**.go" | |
- "**.mod" | |
- "**.sum" | |
jobs: | |
test-coverage-upload: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: 1.17 | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.mod') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Test | |
run: | | |
set +e -x | |
make test | |
TEST_FAILED=false | |
[[ $? == 0 ]] && echo "TEST_FAILED=true" >> $GITHUB_ENV | |
id: test_status | |
- name: Convert coverage to lcov | |
if: github.event_name == 'pull_request' | |
uses: jandelgado/gcov2lcov-action@v1 | |
- name: Code Coverage Report | |
if: github.event_name == 'pull_request' | |
uses: vebr/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
lcov-file: coverage.lcov | |
- name: Fail CI if test was failed | |
if: ${{ env.TEST_FAILED }} | |
run: | | |
false |