Skip to content

fix: patch ruff and mypy issues #5

fix: patch ruff and mypy issues

fix: patch ruff and mypy issues #5

Workflow file for this run

name: Operator Tests
on:
push:
paths:
- "operator/**"
pull_request:
paths:
- "operator/**"
jobs:
test:
name: Run on Ubuntu
runs-on: ubuntu-latest
steps:
- name: Clone the code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: operator/go.mod
- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('operator/go.sum') }}
- name: Run linter
uses: golangci/golangci-lint-action@v8
with:
version: v2.1.6
working-directory: operator
- name: Check that generated code is up to date
run: |
make generate
if ! git diff --exit-code; then
echo "::error::Generated code is not up to date. Please run 'make generate' and commit changes."
exit 1
fi
- name: check if go.mod is tidy
run: |
cd operator
go mod tidy
if ! git diff --exit-code; then
echo "::error::go.mod is not tidy. Please run 'go mod tidy' and commit changes."
exit 1
fi
- name: Running Tests
run: |
make test