Skip to content

✨ Add CI/CD workflows for linting, validation, and documentation checks#18

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-0e012157-cb11-4e8f-b6ee-932ec9d027b5
Draft

✨ Add CI/CD workflows for linting, validation, and documentation checks#18
Copilot wants to merge 2 commits intomainfrom
copilot/fix-0e012157-cb11-4e8f-b6ee-932ec9d027b5

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Oct 5, 2025

Overview

This PR integrates comprehensive GitHub Actions CI/CD workflows to improve developer experience through automated linting, validation, and documentation checks. This addresses issue #[issue_number] to enhance the repository's DevEx with automated quality gates.

What's New

🔄 GitHub Actions Workflows

Added 4 automated workflows that run on every push and pull request:

  1. YAML Lint - Validates YAML syntax and style across all Azure DevOps templates using yamllint
  2. Validate Templates - Ensures all YAML files can be parsed correctly using Python's PyYAML library
  3. Documentation Check - Lints markdown files and validates links to catch documentation issues
  4. CI Summary - Provides comprehensive status information for all CI checks

All workflows are triggered automatically on:

  • Push to main branch
  • Pull requests to main branch
  • Changes to relevant file types (YAML/markdown)

⚙️ Configuration Files

Added configuration files tailored for Azure DevOps template repositories:

  • .yamllint.yml - Custom yamllint rules that accommodate Azure DevOps template syntax (allows 200-char lines, flexible indentation for conditionals, etc.)
  • .markdownlint.json - Markdown linting rules with relaxed line length limits for documentation
  • .markdown-link-check.json - Link checker configuration with retry logic and patterns for internal GitHub links
  • .gitignore - Excludes Python artifacts, IDE files, and temporary files

📝 Documentation Updates

Enhanced the README with:

  • CI/CD Status Badges - Four badges at the top showing real-time workflow status
  • Continuous Integration Section - New section explaining the automated checks in the Contributing guide
  • Updated Testing Instructions - Added commands for running yamllint and validation locally so contributors can test before pushing

🔧 Template Fixes

Fixed existing issues discovered during validation:

  • steps/twingate-connect.yaml - Converted CRLF line endings to Unix LF format
  • steps/terraform.yaml - Fixed indentation in conditional block for tfcmt tool installation
  • resources/tfcmt.yaml - Added missing newline at end of file

Benefits

  • Automated Quality Checks - Every PR gets immediate validation feedback
  • Early Error Detection - Syntax and formatting errors caught before merge
  • Consistent Standards - All templates follow the same YAML conventions
  • Documentation Quality - Broken links and markdown issues detected automatically
  • Better Collaboration - Clear CI status visible on all PRs
  • Local Testing - Contributors can run the same checks locally before pushing

Testing

All workflows have been tested and validated:

  • ✅ All YAML files pass yamllint (1 acceptable warning about line length in existing file)
  • ✅ All templates parse correctly with PyYAML
  • ✅ All GitHub Actions workflow files are syntactically valid
  • ✅ All configuration files properly formatted

Screenshots

The README now includes these badges at the top:

YAML Lint
Validate Templates
Documentation Check
CI

Files Changed

Created (8 files):

  • .github/workflows/ci.yml
  • .github/workflows/documentation-check.yml
  • .github/workflows/validate-templates.yml
  • .github/workflows/yaml-lint.yml
  • .yamllint.yml
  • .markdownlint.json
  • .markdown-link-check.json
  • .gitignore

Modified (4 files):

  • README.md - Added badges and CI documentation
  • resources/tfcmt.yaml - Added newline
  • steps/terraform.yaml - Fixed indentation
  • steps/twingate-connect.yaml - Fixed line endings

Future Enhancements

Potential follow-up improvements (not included in this PR):

  • Automated release workflow with version tagging
  • Security scanning for sensitive data in templates
  • Automated changelog generation
  • Template testing in live Azure DevOps environment

Closes #[issue_number]

Original prompt

This section details on the original issue you should resolve

<issue_title>✨ DevEx Improvement #2</issue_title>
<issue_description>Integrate CI/CD workflows (e.g., GitHub Actions) for linting, validation, and deployment.


This issue was automatically generated from the DevEx Scorecard analysis to help improve the developer experience of this repository.

Priority: Based on AI analysis
Category: Developer Experience
Source: DevEx Scorecard

<Copilot, please analyze this recommendation and create an implementation plan></issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #17

💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

…entation checks

Co-authored-by: bancey <23360105+bancey@users.noreply.github.com>
Copilot AI changed the title [WIP] ✨ DevEx Improvement #2 ✨ Add CI/CD workflows for linting, validation, and documentation checks Oct 5, 2025
Copilot AI requested a review from bancey October 5, 2025 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ DevEx Improvement #2

2 participants