Skip to content

Install golint in CI #3

Install golint in CI

Install golint in CI #3

Workflow file for this run

name: continuous integration
on: push
jobs:
cancel-previous:
name: Cancel previous runs
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
lint:
name: Go lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Install golint
run: go install golang.org/x/lint/golint
- name: Vet
run: make vet
- name: Linter
run: make lint
- name: Formatting
run: make format-check
test:
name: Tests
runs-on: ubunto-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Run tests
run: make test
runs-complete:
name: Lint and test
needs: [lint, test]
if: always()
runs-on: ubuntu-latest
steps:
- if: ${{ needs['lint'].result != 'success' || needs['test'].result != 'success' }}
name: Fail
run: exit 1
- name: Tests complete
run: echo "Tests complete"