Files
dance-lessons-coach/scripts/cicd/test-cicd-simple.sh
Gabriel Radureau 7c6075e836
Some checks failed
Go CI/CD Pipeline / Lint and Format (push) Failing after 1m45s
Go CI/CD Pipeline / Arcodange Workflow Validation (push) Failing after 5m39s
Go CI/CD Pipeline / Build and Test (push) Failing after 7m9s
Go CI/CD Pipeline / Version Management (push) Has been skipped
🤖 feat: simplify CI/CD structure and add Docker workflow
- Rename ci-cd.yaml to go-ci-cd.yaml for clarity
- Add dockerimage.yaml workflow for Docker builds
- Create Dockerfile for production deployment
- Add comprehensive CI/CD documentation
- Create contributor-quickstart.sh for easy validation
- Update all scripts to handle both workflow files
- Fix event triggers to run on all relevant pushes
- Remove redundant YAML syntax validation
- Improve workflow validation for Arcodange conventions

BREAKING CHANGE: ci-cd.yaml renamed to go-ci-cd.yaml
See scripts/cicd/README.md for complete documentation.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-04-06 11:02:36 +02:00

62 lines
2.0 KiB
Bash
Executable File

#!/bin/bash
# Simple CI/CD testing without Gitea instance
# Tests the workflow steps locally using docker containers
set -e
echo "🧪 Simple CI/CD Testing (No Gitea Required)"
echo "=========================================="
# 1. YAML Linting
echo "1. Running YAML linting..."
if [ -f ".yamllint.yaml" ]; then
docker run --rm -v $(pwd):/workspace -w /workspace pipelinecomponents/yamllint:latest \
yamllint -c .yamllint.yaml .gitea/workflows/
else
docker run --rm -v $(pwd):/workspace -w /workspace pipelinecomponents/yamllint:latest \
yamllint .gitea/workflows/
fi
echo "✅ YAML linting passed"
# 2. YAML Validation
echo "2. Running YAML validation..."
WORKFLOW_FILES=(".gitea/workflows/go-ci-cd.yaml" ".gitea/workflows/dockerimage.yaml")
for file in "${WORKFLOW_FILES[@]}"; do
docker run --rm -v $(pwd):/workspace -w /workspace mikefarah/yq:latest eval '.' "$file" > /dev/null
done
echo "✅ YAML validation passed"
# 3. Workflow Structure Validation
echo "3. Running workflow structure validation..."
./scripts/cicd/validate-workflow.sh
# 4. Simulate Build Job
echo "4. Simulating build-test job..."
docker run --rm -v $(pwd):/workspace -w /workspace golang:1.26.1 bash -c "
apt-get update -qq && apt-get install -y -qq git > /dev/null && \
go mod tidy && \
go build ./... && \
go test ./... -cover -v
"
echo "✅ Build and test completed"
# 5. Simulate Lint Job
echo "5. Simulating lint-format job..."
docker run --rm -v $(pwd):/workspace -w /workspace golang:1.26.1 bash -c "
go fmt ./... && \
go vet ./... && \
echo 'Formatting check passed'
"
echo "✅ Linting completed"
echo ""
echo "🎉 Simple CI/CD Testing Complete!"
echo "=========================================="
echo "✅ All workflow steps validated locally"
echo "📝 Workflow is ready for Gitea deployment"
echo ""
echo "🚀 To deploy to Gitea:"
echo " 1. Create config/runner file with your Gitea runner token"
echo " 2. Set GITEA_RUNNER_REGISTRATION_TOKEN environment variable"
echo " 3. Run: docker compose -f docker-compose.cicd-test.yml up"