GitHub Workflows Documentation

This document describes the function of each GitHub workflow in this repository.

Core Workflows

1. Build, Test, and Publish (build-test-publish.yml)

Purpose: Main CI/CD pipeline for building, testing, and publishing the library.

Triggers:

  • Push to main branch
  • Pull requests to main branch
  • Tags starting with v*

Functions:

  • βœ… Validates Gradle wrapper
  • πŸ—οΈ Builds all modules
  • πŸ§ͺ Runs tests with coverage reporting
  • πŸ“Š Generates JaCoCo coverage badges
  • πŸ“¦ Creates JAR artifacts
  • πŸš€ Publishes releases (production and development)
  • πŸ’¬ Comments coverage results on PRs
  • ❌ Fails PRs with coverage below 70%

Artifacts:

  • JAR files for all modules
  • Coverage reports and badges

2. Security Scan (security-scan.yml)

Purpose: Comprehensive security analysis of the codebase and dependencies.

Triggers:

  • Push to main branch
  • Pull requests to main branch
  • Weekly schedule (Monday 6 AM)

Functions:

  • πŸ›‘οΈ OWASP dependency vulnerability scanning
  • πŸ” CodeQL static analysis for security issues
  • πŸ” TruffleHog secrets scanning
  • πŸ“„ Uploads security reports

3. Dependency Check (dependency-check.yml)

Purpose: Focused dependency vulnerability monitoring.

Triggers:

  • Weekly schedule (Sunday midnight)
  • Manual trigger
  • Changes to build files or lock files

Functions:

  • πŸ” Scans dependencies for known vulnerabilities
  • πŸ“Š Generates detailed vulnerability reports
  • 🚨 Creates GitHub issues for critical vulnerabilities
  • ❌ Fails builds with high/critical vulnerabilities

4. License Compliance (license-compliance.yml)

Purpose: Ensures all dependencies have compatible licenses.

Triggers:

  • Push to main branch
  • Pull requests to main branch
  • Weekly schedule (Monday 2 AM)

Functions:

  • πŸ“œ Generates license reports for all dependencies
  • ⚠️ Flags restrictive licenses (GPL, AGPL, etc.)
  • πŸ” Additional secrets scanning
  • πŸ“„ Creates license compliance artifacts

5. Performance Testing (performance-test.yml)

Purpose: Runs JMH benchmarks to monitor performance.

Triggers:

  • Pull requests affecting source code
  • Push to main branch
  • Manual trigger

Functions:

  • πŸƒ Runs JMH performance benchmarks (if available)
  • πŸ“Š Generates performance reports
  • πŸ’¬ Comments benchmark results on PRs
  • πŸ“ˆ Tracks performance over time

6. Dependency Updates (dependency-updates.yml)

Purpose: Automated dependency management.

Triggers:

  • Weekly schedule (Monday 3 AM)
  • Manual trigger

Functions:

  • ⬆️ Updates Gradle wrapper to latest version
  • πŸ”„ Updates dependencies to latest compatible versions
  • πŸ”’ Regenerates lock files
  • πŸ”§ Creates PR with dependency updates

7. Generate Changelog (changelog.yml)

Purpose: Maintains project changelog using conventional commits.

Triggers:

  • Push to main branch
  • Tags starting with v*
  • Manual trigger

Functions:

  • πŸ“ Generates CHANGELOG.md from commit history
  • 🏷️ Creates release notes for tags
  • πŸ”„ Commits changelog updates automatically

8. Deploy GitHub Pages (pages.yml)

Purpose: Publishes documentation website.

Triggers:

  • Manual trigger only (currently disabled)
  • Can be enabled for docs changes

Functions:

  • 🌐 Builds Jekyll documentation site
  • πŸ“€ Deploys to GitHub Pages
  • πŸ“š Makes documentation accessible via web

Branch Protection and Code Quality

Coverage Requirements

  • Minimum Overall Coverage: 70%
  • Minimum Branch Coverage: 60%
  • All PRs must meet these thresholds to be merged

Security Requirements

  • No high or critical vulnerability dependencies
  • All commits must be GPG signed
  • Code must pass security scans

Testing Requirements

  • Unit tests must use @Test(groups=["small"]) annotation
  • All modules require test coverage (except excluded ones)
  • Performance tests use JMH framework

Workflow Optimization

The workflows are designed to:

  • βœ… Run in parallel where possible
  • πŸ”„ Share artifacts between jobs
  • πŸ“¦ Cache dependencies for faster builds
  • πŸ’Ύ Store reports for analysis
  • 🚫 Fail fast on critical issues

Artifact Management

Development Releases (*-dev tags)

  • Stored in .repo/dev-releases/ directory
  • Marked as prerelease
  • Available for testing purposes

Production Releases (version tags)

  • Published to GitHub Packages
  • Created as GitHub releases
  • Include changelog and artifacts

Manual Triggers

Most workflows support manual triggering via GitHub Actions UI:

  1. Go to Actions tab
  2. Select workflow
  3. Click β€œRun workflow”
  4. Choose branch and parameters

Copyright © 2025 Programmer Newbie IO. Distributed under the MIT License.