Skip to content

ci(core): add PR title/commit validation and Actionlint workflow - #238

Merged
GiZano merged 5 commits into
mainfrom
devops
Apr 23, 2026
Merged

ci(core): add PR title/commit validation and Actionlint workflow#238
GiZano merged 5 commits into
mainfrom
devops

Conversation

@GiZano

@GiZano GiZano commented Apr 23, 2026

Copy link
Copy Markdown
Owner

name: Pull Request
about: Standard PR format for all QuakeGuard contributions
title: "ci(core): add PR title/commit validation and Actionlint workflow"

Overview

This PR introduces vital DevOps hygiene features to prevent malformed commit messages, poorly titled PRs, and broken YAML configurations from entering the main branch. It utilizes standard Conventional Commits for the git history, semantic PR titles for easy changelog generation, and a dedicated actionlint job to parse GitHub Actions workflows. Resolves Issue #229.

Changes Made

  • .commitlintrc.json: Created standard configuration allowing types like feat, fix, sec and scopes like backend, frontend, iot.
  • backend-ci.yml, frontend-ci.yml, iot-ci.yml: Added the wagoid/commitlint-github-action step right after code checkout.
  • .github/workflows/pr-lint.yml: Added a dedicated job triggering on PR open/edit that enforces titles like feat(backend): add route.
  • .github/workflows/devops-ci.yml: Added an independent CI pipeline triggered on .github/workflows/** changes that uses actionlint to statically verify YAML files.

Impact & Next Steps

  • Our git log will immediately become highly readable, machine-parsable, and organized.
  • If a developer makes a typo referencing a GitHub Secret (e.g., ${{ secrets.MY_TYPO }}), actionlint will catch it instantly during the PR phase, rather than failing during a production deploy.
  • Next Steps: No further steps required. Developers will need to adhere to the standard type(scope): message going forward.

Testing Performed

  • Verified actionlint correctly parses all 5 workflow files in the directory without errors.
  • Pushed a test commit with a malformed message and verified the CI pipeline fails.
  • Pushed a test commit with a correct message (ci(core): test lint) and verified the CI pipeline passes.
  • Opened a draft PR with a bad title and verified the Semantic PR Check rejects it.

Related Issues

Closes #229
Closes #230
Closes #231
Closes #232
Closes #233
Closes #234
Closes #235

GiZano and others added 4 commits April 23, 2026 23:27
- Add `iot-ci` job to `.github/workflows/quakeguard-ci.yml` running on `ubuntu-latest`.
- Install PlatformIO Core via Python `pip` in the GitHub Action runner.
- Create `esp32_config.env.example` with dummy values for CI testing.
- Inject dummy `ENROLLMENT_TOKEN` into the build environment to satisfy the `#error` fail-fast compiler check.
- Execute `pio run` to validate firmware compilation cleanly without attempting hardware flashing.
- Verify pipeline correctly catches introduced C++ syntax errors.

Closes #215, Closes #216, Closes #217, Closes #218, Closes #219, Closes #220, Closes #221
…d secure credentials

- Remove monolithic `quakeguard-ci.yml` to prevent duplicate and noisy pipeline executions.
- Split CI into `backend-ci.yml`, `frontend-ci.yml`, and `iot-ci.yml` with path-based triggers to drastically reduce wasted CI minutes.
- Introduce PlatformIO build validation in `iot-ci.yml` to automatically catch C++ syntax and configuration errors.
- Create `esp32_config.env.example` and inject dummy `ENROLLMENT_TOKEN` to satisfy IoT compile-time `#error` checks.
- Refactor `backend-ci.yml` to replace hardcoded dummy database credentials with GitHub Actions `${{ secrets.* }}`.
- Update `pg_isready` readiness check in the backend pipeline to utilize dynamic secret injection.

Closes #215, Closes #216, Closes #217, Closes #218, Closes #219, Closes #220, Closes #221
Closes #222, Closes #223, Closes #224, Closes #225, Closes #226, Closes #227, Closes #228
# Conflicts:
#	.github/workflows/quakeguard-ci.yml

Co-authored-by: GiZano <136728817+GiZano@users.noreply.github.com>
- Add `.commitlintrc.json` enforcing conventional commit types and scopes.
- Inject `wagoid/commitlint-github-action` into backend, frontend, and IoT workflows to validate commit history on push.
- Create `pr-lint.yml` using `amannn/action-semantic-pull-request` to require strict semantic PR titles (e.g., `feat(backend): ...`).
- Create `devops-ci.yml` triggering strictly on `.github/workflows/**` modifications.
- Implement `reviewdog/action-actionlint` to statically analyze YAML syntax, detect undefined secrets, and prevent broken pipelines.

Closes #229, Closes #230, Closes #231, Closes #232, Closes #233, Closes #234, Closes #235
@GiZano
GiZano requested a review from riccardo0731 as a code owner April 23, 2026 22:01
@GiZano
GiZano merged commit d2e1fdc into main Apr 23, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment