Skip to content

Compatibility with new NetBox versions #1512

Compatibility with new NetBox versions

Compatibility with new NetBox versions #1512

Workflow file for this run

---
name: Static analysis
on: # yamllint disable-line rule:truthy
push:
branches:
- main
tags:
- v*
workflow_run:
workflows: ["Release"]
types: [completed]
branches: [main]
pull_request:
permissions: read-all
jobs:
go-and-crds:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name != 'workflow_run' }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5.0.0
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version-file: "go.mod"
- name: golangci-lint
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
with:
version: v2.4.0
args: --config tools/.golangci.yaml
- run: |
set -euo pipefail
make vet
- run: |
set -euo pipefail
make lint
- run: |
set -euo pipefail
make fmt
DIFF=$(git status --porcelain)
if [ -n "$DIFF" ]; then
echo "These files were modified:"
echo
echo "$DIFF"
echo
exit 1
fi
- run: |
set -euo pipefail
DIFF=$(git status --porcelain)
make generate manifests
if [ -n "$DIFF" ]; then
echo "These files were modified:"
echo
echo "$DIFF"
echo
echo "Please run make generate manifests and commit the changes."
exit 1
fi
codespell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5.0.0
- name: Run codespell
uses: codespell-project/actions-codespell@v2
with:
skip: "*.svg"
yamllint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5.0.0
- name: "Yamllint"
uses: karancode/yamllint-github-action@master