Repository navigation
🐛 Honor Hub proxies for Git and Maven in agent runs #771
Workflow file for this run
This file contains hidden or 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: Lint | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - 'release-*' | |
| pull_request: | |
| merge_group: | |
| permissions: {} | |
| jobs: | |
| lint: | |
| permissions: | |
| contents: read | |
| name: Run on Ubuntu | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Clone the code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Go | |
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: go.mod | |
| - name: Check linter configuration | |
| run: make lint-config | |
| - name: Run linter | |
| run: make lint | |
| api-lint: | |
| permissions: | |
| contents: read | |
| name: API lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Clone the code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Go | |
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: api/go.mod | |
| - name: Check formatting | |
| working-directory: api | |
| run: gofmt -l . && test -z "$(gofmt -l .)" | |
| - name: Run go vet | |
| working-directory: api | |
| run: go vet ./... | |
| harness-lint: | |
| permissions: | |
| contents: read | |
| name: Harness lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Clone the code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Go | |
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: harness/go.mod | |
| - name: Check formatting | |
| working-directory: harness | |
| run: gofmt -l . && test -z "$(gofmt -l .)" | |
| - name: Run go vet | |
| working-directory: harness | |
| run: go vet ./... | |
| lints: | |
| if: ${{ always() }} | |
| runs-on: ubuntu-latest | |
| name: lints | |
| needs: | |
| - lint | |
| - api-lint | |
| - harness-lint | |
| steps: | |
| - name: Check lint results | |
| env: | |
| RESULT_LINT: ${{ needs.lint.result }} | |
| RESULT_API_LINT: ${{ needs.api-lint.result }} | |
| RESULT_HARNESS_LINT: ${{ needs.harness-lint.result }} | |
| run: | | |
| FAILED=false | |
| for result_var in RESULT_LINT RESULT_API_LINT RESULT_HARNESS_LINT; do | |
| result="${!result_var}" | |
| if [[ "$result" != "success" && "$result" != "skipped" ]]; then | |
| echo "::error::${result_var} = ${result}" | |
| FAILED=true | |
| fi | |
| done | |
| if [[ "$FAILED" == "true" ]]; then | |
| exit 1 | |
| fi | |
| echo "All checks passed" |