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