diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 107396a4ee3..7f6fd0c4f91 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -783,6 +783,7 @@ embed.go @grafana/grafana-as-code /.github/workflows/issue-opened.yml @grafana/grafana-community-support /.github/workflows/metrics-collector.yml @torkelo /.github/workflows/milestone.yml @tolzhabayev +/.github/workflows/pr-backend-code-checks.yml @grafana/grafana-backend-group /.github/workflows/pr-checks.yml @tolzhabayev /.github/workflows/pr-codeql-analysis-go.yml @DanCech /.github/workflows/pr-codeql-analysis-javascript.yml @DanCech diff --git a/.github/workflows/pr-backend-code-checks.yml b/.github/workflows/pr-backend-code-checks.yml new file mode 100644 index 00000000000..bd26963ad39 --- /dev/null +++ b/.github/workflows/pr-backend-code-checks.yml @@ -0,0 +1,32 @@ +name: Backend Code Checks +description: Validate go.mod and OpenAPI specifications + +on: + pull_request: + paths-ignore: + - '*.md' + - 'docs/**' + - 'latest.json' + +permissions: + contents: read + +jobs: + validate-configs: + name: Validate Backend Configs + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: '1.23.5' + cache: true + + - name: Validate go.mod + run: go run scripts/modowners/modowners.go check go.mod + + - name: Generate and Validate OpenAPI Specs + run: | + make swagger-gen