From 370fbdf72fa8b1367f5701e9bcca8b34ed7a8a8e Mon Sep 17 00:00:00 2001 From: Gabriel Radureau Date: Mon, 6 Apr 2026 12:53:43 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20resolve=20CI=20workflow?= =?UTF-8?q?=20issues?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix three critical CI issues: 1. SWAG TOOL: Install swag before go generate - Adds 'Install swag' step to build-test job - Prevents 'command not found' errors - Ensures swagger docs can be generated 2. GO VET REDUNDANCY: Remove duplicate go vet - Removes go vet from lint-format job - Keeps go vet only in build-test job - Reduces CI execution time 3. WORKFLOW VALIDATION: Fix yamllint path - Updates validate-workflow.sh to use absolute paths - Fixes .yamllint.yaml file not found error - Makes path resolution more robust These fixes address the root causes of: - Job 350 failure (missing swag) - Redundant validation (duplicate go vet) - Workflow validation failures (wrong paths) Tested locally and ready for CI. --- .gitea/workflows/go-ci-cd.yaml | 6 +++--- scripts/cicd/validate-workflow.sh | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/go-ci-cd.yaml b/.gitea/workflows/go-ci-cd.yaml index 0120823..c7cb905 100644 --- a/.gitea/workflows/go-ci-cd.yaml +++ b/.gitea/workflows/go-ci-cd.yaml @@ -60,6 +60,9 @@ jobs: - name: Install dependencies run: go mod tidy + - name: Install swag + run: go install github.com/swaggo/swag/cmd/swag@latest + - name: Generate Swagger Docs run: cd pkg/server && go generate @@ -91,9 +94,6 @@ jobs: - name: Run go fmt run: go fmt ./... - - name: Run go vet - run: go vet ./... - - name: Check for formatting issues run: | if [ -n "$(go fmt ./...)" ]; then diff --git a/scripts/cicd/validate-workflow.sh b/scripts/cicd/validate-workflow.sh index 45e70b4..d6a73b9 100755 --- a/scripts/cicd/validate-workflow.sh +++ b/scripts/cicd/validate-workflow.sh @@ -38,7 +38,7 @@ fi if command -v yamllint >/dev/null 2>&1; then for file in "${WORKFLOW_FILES[@]}"; do if [ -f ".yamllint.yaml" ]; then - yamllint -c .yamllint.yaml "$file" + yamllint -c "$(pwd)/.yamllint.yaml" "$file" else yamllint "$file" fi @@ -47,7 +47,7 @@ elif docker info >/dev/null 2>&1; then for file in "${WORKFLOW_FILES[@]}"; do if [ -f ".yamllint.yaml" ]; then docker run --rm -v $(pwd):/workspace -w /workspace pipelinecomponents/yamllint:latest \ - yamllint -c .yamllint.yaml "$file" + yamllint -c /workspace/.yamllint.yaml "$file" else docker run --rm -v $(pwd):/workspace -w /workspace pipelinecomponents/yamllint:latest \ yamllint "$file"