Files
dance-lessons-coach/STATUS_BADGES.md
Gabriel Radureau b391534f2d 🤖 feat: implement trunk-based CI/CD with local testing
- Designed trunk-based development workflow with branch protection
- Added workflow validation job to prevent main branch breaks
- Integrated act (GitHub Actions runner) for local Gitea workflow testing
- Created unified CI/CD script interface (scripts/cicd.sh)
- Added YAML lint configuration with practical limits (400 chars)
- Organized all CI/CD scripts under scripts/cicd/ directory
- Confirmed Gitea/GitHub Actions compatibility via local testing
- Updated ADR 0017 with implementation details and test results
- Enhanced documentation with local development workflow

See ADR-0017 for complete trunk-based development workflow documentation.
See ADR-0016 for CI/CD pipeline design.
2026-04-05 23:07:32 +02:00

8.1 KiB

CI/CD Status Badges

This document provides badge examples for different CI/CD platforms and code quality services.

Gitea (Primary Platform)

[![Build Status](https://gitea.arcodange.fr/api/badges/arcodange/DanceLessonsCoach/status)](https://gitea.arcodange.fr/arcodange/DanceLessonsCoach)
[![Pipeline Status](https://gitea.arcodange.fr/api/badges/arcodange/DanceLessonsCoach/pipeline.svg)](https://gitea.arcodange.fr/arcodange/DanceLessonsCoach/-/pipelines)

Configuration Notes:

  • Organization: arcodange
  • Repository: DanceLessonsCoach
  • Internal URL (for CI/CD scripts): https://gitea.arcodange.lab/
  • External URL (for public badges): https://gitea.arcodange.fr/
  • SSH URL: ssh://git@192.168.1.202:2222/arcodange/DanceLessonsCoach.git
  • Badge API: Uses external domain with full org/repo path
  • CI/CD Configuration: Uses internal domain for faster network access

GitHub Mirror

[![GitHub CI](https://github.com/yourorg/DanceLessonsCoach/actions/workflows/main.yml/badge.svg)](https://github.com/yourorg/DanceLessonsCoach/actions)
[![GitHub Issues](https://img.shields.io/github/issues/yourorg/DanceLessonsCoach.svg)](https://github.com/yourorg/DanceLessonsCoach/issues)
[![GitHub Stars](https://img.shields.io/github/stars/yourorg/DanceLessonsCoach.svg)](https://github.com/yourorg/DanceLessonsCoach/stargazers)
[![GitHub License](https://img.shields.io/github/license/yourorg/DanceLessonsCoach.svg)](https://github.com/yourorg/DanceLessonsCoach/blob/main/LICENSE)

Replace yourorg with your actual GitHub organization/user name.

GitLab Mirror

[![GitLab CI](https://gitlab.com/yourorg/DanceLessonsCoach/badges/main/pipeline.svg)](https://gitlab.com/yourorg/DanceLessonsCoach/-/pipelines)
[![GitLab Coverage](https://gitlab.com/yourorg/DanceLessonsCoach/badges/main/coverage.svg)](https://gitlab.com/yourorg/DanceLessonsCoach/-/commits/main)

Replace yourorg with your actual GitLab organization/user name.

Code Quality Badges

Go Report Card

[![Go Report Card](https://goreportcard.com/badge/github.com/yourorg/DanceLessonsCoach)](https://goreportcard.com/report/github.com/yourorg/DanceLessonsCoach)

Code Coverage (Codecov)

[![Code Coverage](https://codecov.io/gh/yourorg/DanceLessonsCoach/branch/main/graph/badge.svg)](https://codecov.io/gh/yourorg/DanceLessonsCoach)

Code Climate

[![Code Climate](https://codeclimate.com/github/yourorg/DanceLessonsCoach/badges/gpa.svg)](https://codeclimate.com/github/yourorg/DanceLessonsCoach)
[![Issue Count](https://codeclimate.com/github/yourorg/DanceLessonsCoach/badges/issue_count.svg)](https://codeclimate.com/github/yourorg/DanceLessonsCoach)

Version Badges

[![Version](https://img.shields.io/github/v/release/yourorg/DanceLessonsCoach.svg)](https://github.com/yourorg/DanceLessonsCoach/releases/latest)
[![Release Date](https://img.shields.io/github/release-date/yourorg/DanceLessonsCoach.svg)](https://github.com/yourorg/DanceLessonsCoach/releases/latest)
[![Go Version](https://img.shields.io/github/go-mod/go-version/yourorg/DanceLessonsCoach.svg)](https://github.com/yourorg/DanceLessonsCoach/blob/main/go.mod)

Combined Badge Example

Here's how to combine multiple badges in your README:

# DanceLessonsCoach

[![Build Status](https://ci.your-gitea-instance.com/api/badges/project/status)](https://ci.your-gitea-instance.com)
[![GitHub CI](https://github.com/yourorg/DanceLessonsCoach/actions/workflows/main.yml/badge.svg)](https://github.com/yourorg/DanceLessonsCoach/actions)
[![GitLab CI](https://gitlab.com/yourorg/DanceLessonsCoach/badges/main/pipeline.svg)](https://gitlab.com/yourorg/DanceLessonsCoach/-/pipelines)

[![Go Report Card](https://goreportcard.com/badge/github.com/yourorg/DanceLessonsCoach)](https://goreportcard.com/report/github.com/yourorg/DanceLessonsCoach)
[![Code Coverage](https://codecov.io/gh/yourorg/DanceLessonsCoach/branch/main/graph/badge.svg)](https://codecov.io/gh/yourorg/DanceLessonsCoach)

[![Version](https://img.shields.io/github/v/release/yourorg/DanceLessonsCoach.svg)](https://github.com/yourorg/DanceLessonsCoach/releases/latest)
[![Go Version](https://img.shields.io/github/go-mod/go-version/yourorg/DanceLessonsCoach.svg)](https://github.com/yourorg/DanceLessonsCoach/blob/main/go.mod)
[![License](https://img.shields.io/github/license/yourorg/DanceLessonsCoach.svg)](https://github.com/yourorg/DanceLessonsCoach/blob/main/LICENSE)

Setup Instructions

For Gitea (Arcodange Configuration)

# 1. Configure CI/CD runners to use INTERNAL URL
export GITEA_URL="https://gitea.arcodange.lab/"
export GITEA_ORG="arcodange"
export GITEA_REPO="DanceLessonsCoach"

# 2. Enable GitHub Actions compatibility in repo settings
#    - Go to: https://gitea.arcodange.lab/arcodange/DanceLessonsCoach/settings/actions
#    - Enable GitHub Actions
#    - Configure runner to use internal network (192.168.1.202)

# 3. Workflow files are in .gitea/workflows/ (not .github/workflows/)
#    - Main workflow: .gitea/workflows/ci-cd.yaml
#    - Follows Arcodange conventions from webapp workflow

# 4. Use EXTERNAL URL for public badges
#    - Badge API: https://gitea.arcodange.fr/api/badges/arcodange/DanceLessonsCoach/status
#    - Public access: https://gitea.arcodange.fr/arcodange/DanceLessonsCoach
#    - SSH access: ssh://git@192.168.1.202:2222/arcodange/DanceLessonsCoach.git

For CI/CD Configuration Files

# .github/workflows/main.yml
# Arcodange-specific environment variables
env:
  GITEA_INTERNAL: "https://gitea.arcodange.lab/"
  GITEA_EXTERNAL: "https://gitea.arcodange.fr/"
  GITEA_ORG: "arcodange"
  GITEA_REPO: "DanceLessonsCoach"
  GITEA_SSH: "ssh://git@192.168.1.202:2222/arcodange/DanceLessonsCoach.git"

For Badge Usage

# Always use EXTERNAL URL with full org/repo path for badges in README
[![Build Status](https://gitea.arcodange.fr/api/badges/arcodange/DanceLessonsCoach/status)](https://gitea.arcodange.fr/arcodange/DanceLessonsCoach)
[![Pipeline](https://gitea.arcodange.fr/api/badges/arcodange/DanceLessonsCoach/pipeline.svg)](https://gitea.arcodange.fr/arcodange/DanceLessonsCoach/-/pipelines)

For GitHub

  1. Enable GitHub Actions on your mirror repository
  2. Badges will automatically work with the provided URLs
  3. Configure branch protection rules as needed

For GitLab

  1. Create a .gitlab-ci.yml file (can convert from GitHub Actions)
  2. Enable pipeline badges in GitLab CI/CD settings
  3. Use the provided badge URLs

For External Services

  1. Go Report Card: Just visit https://goreportcard.com/report/github.com/yourorg/DanceLessonsCoach
  2. Codecov: Sign up at codecov.io and integrate with your repository
  3. Code Climate: Sign up and add your repository

Badge Customization

You can customize badge appearance using shield.io parameters:

[![Custom Badge](https://img.shields.io/badge/custom-message-blue?style=flat&logo=go)](https://example.com)

Style options: flat, flat-square, plastic, for-the-badge, social Color options: Any hex color or named color (blue, green, red, etc.) Logo options: Add ?logo=go, ?logo=github, etc.

Troubleshooting

Badges not updating

  • Check if CI/CD pipelines are running successfully
  • Verify badge URLs are correct
  • Ensure your repository is public (for external services)
  • Check for caching issues (add cache buster if needed)
  • Verify the platform URLs are correct
  • Check repository visibility settings
  • Ensure CI/CD is properly configured
  • Test badge URLs in browser first

References


Note: Replace all placeholder URLs (yourorg, your-gitea-instance.com) with your actual repository and instance information.