cloudflare/pint
Publicmirrored from https://github.com/cloudflare/pintAvailable
.github/workflows/lint.yml
47lines · modecode
| 1 | name: Lint |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: |
| 6 | - main |
| 7 | pull_request: |
| 8 | branches: |
| 9 | - main |
| 10 | |
| 11 | jobs: |
| 12 | golangci-lint: |
| 13 | runs-on: ubuntu-latest |
| 14 | steps: |
| 15 | - name: Check out code |
| 16 | uses: actions/checkout@v4 |
| 17 | with: |
| 18 | show-progress: false |
| 19 | |
| 20 | - name: Set up Go |
| 21 | uses: actions/setup-go@v5 |
| 22 | with: |
| 23 | go-version-file: go.ver |
| 24 | cache-dependency-path: tools/golangci-lint/go.sum |
| 25 | |
| 26 | - name: Lint code |
| 27 | run: make lint |
| 28 | |
| 29 | format: |
| 30 | runs-on: ubuntu-latest |
| 31 | steps: |
| 32 | - name: Check out code |
| 33 | uses: actions/checkout@v4 |
| 34 | with: |
| 35 | show-progress: false |
| 36 | |
| 37 | - name: Set up Go |
| 38 | uses: actions/setup-go@v5 |
| 39 | with: |
| 40 | go-version-file: go.ver |
| 41 | cache-dependency-path: tools/gofumpt/go.sum |
| 42 | |
| 43 | - name: Format code |
| 44 | run: make format |
| 45 | |
| 46 | - name: Check for local changes |
| 47 | run: git diff --exit-code |
| 48 | |