ci: Fix linting in touched files #11
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: Unit Test | |
on: | |
push: | |
branches-ignore: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_call: | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get go version from go.mod | |
run: | | |
echo "GO_VERSION=$(grep '^go ' go.mod | cut -d " " -f 2)" >> $GITHUB_ENV | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Install dependencies | |
run: | | |
go install github.com/golang/mock/[email protected] | |
- name: Generate Mocks | |
run: | | |
make mocks | |
- name: Test with go | |
run: | | |
make coverage | |
# Uncomment the following lines when codecov secret is uploaded | |
- name: Upload unit coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{secrets.CODECOV_TOKEN}} | |
flags: unit | |
files: coverage.cov | |
verbose: false |