Merge pull request #3 from chancez/dependabot/github_actions/golangci… #14
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: Run static checks and unit tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.after }} | |
cancel-in-progress: true | |
jobs: | |
unit-test: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/[email protected] | |
- uses: actions/[email protected] | |
with: | |
go-version-file: 'go.mod' | |
- name: Run static checks | |
uses: golangci/[email protected] | |
- name: Check module vendoring | |
run: | | |
go mod tidy | |
go mod vendor | |
go mod verify | |
git status | |
test -z "$(git status --porcelain)" || (echo "please run 'go mod tidy && go mod vendor', and submit your changes"; exit 1) | |
- name: Run unit tests | |
run: make test | |
- name: Build | |
run: make yfg |