Fixing instance-automation tests #5709
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: Check linting | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| jobs: | |
| golang-lint: | |
| name: Lint golang files | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install prerequisites | |
| run: | | |
| sudo apt-get update && sudo apt-get install --no-install-recommends -y \ | |
| libpcap-dev | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| repository: ${{github.event.pull_request.head.repo.full_name}} | |
| persist-credentials: false | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: ./operators/go.mod | |
| - name: Check linting | |
| uses: golangci/golangci-lint-action@v8 | |
| with: | |
| version: v2.1.0 | |
| working-directory: operators | |
| gomodtidy: | |
| name: Enforce go.mod tidiness | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: "${{ github.event.pull_request.head.sha }}" | |
| repository: ${{github.event.pull_request.head.repo.full_name}} | |
| persist-credentials: false | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: ./operators/go.mod | |
| - name: Execute go mod tidy and check the outcome | |
| working-directory: ./operators | |
| run: | | |
| go mod tidy | |
| exit_code=$(git diff --exit-code) | |
| exit ${exit_code} | |
| - name: Issue a comment in case the of failure | |
| uses: peter-evans/create-or-update-comment@v4 | |
| with: | |
| token: ${{ secrets.CI_TOKEN }} | |
| issue-number: ${{ github.event.pull_request.number }} | |
| body: | | |
| The `go.mod` and/or `go.sum` files appear not to be correctly tidied. | |
| Please, rerun `go mod tidy` to fix the issues. | |
| reactions: confused | |
| if: | | |
| failure() && github.event.pull_request.head.repo.full_name == github.repository | |
| python-lint: | |
| name: Lint python files | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| repository: ${{github.event.pull_request.head.repo.full_name}} | |
| persist-credentials: false | |
| - name: Check linting | |
| uses: TrueBrain/actions-flake8@v2 | |
| markdown-lint: | |
| name: Lint markdown files (check links validity) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| repository: ${{github.event.pull_request.head.repo.full_name}} | |
| persist-credentials: false | |
| - name: Check the validity of the links in the documentation | |
| uses: umbrelladocs/action-linkspector@v1 | |
| with: | |
| github_token: ${{ secrets.github_token }} | |
| fail_level: warning | |
| filter_mode: nofilter | |
| config_file: .linkspector.yml | |
| shell-lint: | |
| name: Lint shell files | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| repository: ${{github.event.pull_request.head.repo.full_name}} | |
| persist-credentials: false | |
| - name: Run shellcheck | |
| uses: azohra/shell-linter@v0.6.0 | |
| with: | |
| exclude-paths: "**/.husky/*-commit" | |
| frontend-lint: | |
| name: Lint frontend files | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| repository: ${{github.event.pull_request.head.repo.full_name}} | |
| persist-credentials: false | |
| - name: Setup nodeJS | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: ./frontend/.nvmrc | |
| - name: Install the packages necessary for lint checking | |
| working-directory: ./frontend | |
| run: npm ci | |
| - name: Check linting | |
| working-directory: ./frontend | |
| run: npm run check-format-lint | |
| qlkube-lint: | |
| name: Lint qlkube files | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| repository: ${{github.event.pull_request.head.repo.full_name}} | |
| persist-credentials: false | |
| - name: Setup nodeJS | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: ./qlkube/.nvmrc | |
| - name: Install the packages necessary for lint checking | |
| working-directory: ./qlkube | |
| run: npm ci | |
| - name: Check linting | |
| working-directory: ./qlkube | |
| run: npm run check-format-lint |