| name: Pre-commit checks |
| |
| on: |
| pull_request: |
| branches: |
| - master |
| |
| jobs: |
| build: |
| runs-on: ubuntu-latest |
| |
| steps: |
| - name: Set up Go |
| uses: actions/setup-go@v2 |
| with: |
| go-version: 1.15 |
| |
| - name: Checkout source code |
| uses: actions/checkout@v2 |
| with: |
| fetch-depth: 2 |
| |
| - name: Check license |
| run: make license-check |
| |
| - name: Go lint |
| run: | |
| curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.33.0 |
| make lint |
| - name: unit test |
| run: make test |
| |
| - name: Code coverage |
| uses: codecov/codecov-action@v1 |