Skip to content

update import pr

update import pr #47

Workflow file for this run

name: Linters
on:
workflow_dispatch:
push:
branches:
- main
- 'release-*'
pull_request:
branches:
- main
- 'release-*'
merge_group:
permissions:
contents: read
pull-requests: read
jobs:
# Detect which paths changed to conditionally run linters
changes:
runs-on: ubuntu-latest
outputs:
controller: ${{ steps.filter.outputs.controller }}
helm: ${{ steps.filter.outputs.helm }}
protocol: ${{ steps.filter.outputs.protocol }}
python: ${{ steps.filter.outputs.python }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
controller:
- 'controller/**'
helm:
- 'controller/deploy/helm/**'
protocol:
- 'protocol/**'
python:
- 'python/**'
lint-go:
needs: changes
if: needs.changes.outputs.controller == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: Run go linter
working-directory: controller
run: make lint
lint-helm:
needs: changes
if: needs.changes.outputs.helm == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run helm linter
working-directory: controller
run: make lint-helm
lint-protobuf:
needs: changes
if: needs.changes.outputs.protocol == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Run protobuf linter
working-directory: protocol
run: make lint
lint-python:
needs: changes
if: needs.changes.outputs.python == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run ruff
uses: astral-sh/ruff-action@84f83ecf9e1e15d26b7984c7ec9cf73d39ffc946 # v3.3.1
with:
src: './python'
version-file: python/pyproject.toml
typos:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run typos
uses: crate-ci/typos@0f0ccba9ed1df83948f0c15026e4f5ccfce46109 # v1.32.0
with:
config: ./typos.toml