Skip to content

ci: Add the CI test pipeline (GitHub Actions)#69

Merged
ebouchut merged 8 commits into
devfrom
ci-test-pipeline
Jul 7, 2026
Merged

ci: Add the CI test pipeline (GitHub Actions)#69
ebouchut merged 8 commits into
devfrom
ci-test-pipeline

Conversation

@ebouchut

@ebouchut ebouchut commented Jul 7, 2026

Copy link
Copy Markdown
Owner

This PR brings a GitHub Actions CI pipeline that builds, tests, lints, and measures test coverage on every PR targeting dev and every push to dev/main.

Following the decision in #49, CI is one focused workflow per concern instead of a monolithic ci.yml:

Workflow PR check What it does
build.yml Build ./mvnw -B -ntp compile
test.yml Tests ./mvnw -B -ntp test + uploads the JaCoCo coverage report as an artifact
lint.yml Lint Checkstyle report (Google ruleset), uploaded as an artifact, non-blocking

All jobs run on ubuntu-latest with Temurin 21 and Maven dependency caching.

Design decisions

Architecture decisions are recorded as ADRs:

  • ADR-0010: one focused workflow per concern. Hence, each PR check names its concern, and each workflow evolves independently.
  • ADR-0011: quality checks start as advisory reports (report-only Checkstyle, JaCoCo without thresholds, no external coverage service).

Note

Rationale: Do not block feature PRs on pre-existing style debt. Tightening path documented (switch to checkstyle:check, add jacoco:check).

Build changes

  • pom.xml: adds maven-checkstyle-plugin 3.6.0 (report-only, bundled google_checks.xml, no lifecycle binding) and jacoco-maven-plugin 0.8.15 (prepare-agent + report bound to the test phase, so every mvn test produces target/site/jacoco/).
  • Tests need no .env on CI: @ServiceConnection wires the Testcontainers PostgreSQL, and the tests exclude the MongoDB autoconfiguration; the runner's built-in Docker daemon is enough.

Documentation

  • docs/plans/2026-07-06-ci-test-pipeline.md: the executed implementation plan with verification results.
  • GLOSSARY.md: new entries for the CI terms (Checkstyle, JaCoCo, workflow, runner, advisory check, ...).
  • GLOSSAIRE.md (new): full French translation of the glossary, cross-linked and kept in sync with the English file.

Verification

  • Local make test after the pom changes: Tests run: 11, Failures: 0, Errors: 0 and the JaCoCo HTML/XML report is produced.
  • All three workflows ran green on this PR.
  • Known and accepted: the Checkstyle report currently shows ~157 warnings, ~85% of which are Google-ruleset disagreements with the project's 4-space indentation and import order. A follow-up may adopt a project ruleset to turn the report into pure signal (anticipated by ADR-0011).

Closes #45
Closes #46
Closes #47
Closes #48

ebouchut added 7 commits July 7, 2026 14:24
Add a Build workflow that compiles the project with the Maven wrapper
on pull requests targeting dev and on pushes to dev and main. Use
actions/setup-java with Temurin 21 and the built-in Maven cache.

Keep one focused workflow per CI concern instead of a monolithic
ci.yml, as decided in issue #49 (wontfix).

Fixes #45
Add a Tests workflow that runs ./mvnw test on pull requests targeting
dev and on pushes to dev and main. All test classes end in *Test and
run under Surefire, per ADR-0009.

Testcontainers starts a real PostgreSQL using the Docker daemon that
ubuntu-latest runners provide, so no extra container setup is needed.
No .env file is required either: @Serviceconnection wires the
datasource to the container and the tests exclude the MongoDB
autoconfiguration.

Fixes #46
Add Checkstyle (maven-checkstyle-plugin 3.6.0, bundled Google ruleset)
as a report-only quality check: checkstyle:checkstyle prints
violations on the console and writes target/checkstyle-result.xml, and
failOnViolation/failsOnError are off, so the build never fails on
violations.

Add a Lint workflow that generates the report on pull requests
targeting dev and on pushes to dev and main, and uploads it as a
workflow artifact. The job uses continue-on-error so it never gates
merges on day one for an existing codebase. Tighten later by switching
to checkstyle:check with failOnViolation, or a project ruleset.

Fixes #47
Add jacoco-maven-plugin 0.8.15 with prepare-agent to instrument the
Surefire forks and a report execution bound to the test phase, so
every `mvn test` run writes the HTML and XML report to
target/site/jacoco/.

Upload that report as a workflow artifact in the Tests workflow. No
external coverage service is used.

Fixes #48
Add ADR-0010 (structure CI as focused workflows per concern, recording why
the monolithic ci.yml of issue #49 was rejected) and ADR-0011 (start CI
quality checks as advisory reports: report-only Checkstyle and JaCoCo
artifacts, gates come later), index both in docs/adr/README.md, and add the
retrospective implementation plan docs/plans/2026-07-06-ci-test-pipeline.md
covering issues #45 to #48 with the verification results.
Add the terms introduced by the CI work to GLOSSARY.md: Checkstyle, code
coverage, JaCoCo, linter, Maven Wrapper, advisory check, CI, GitHub Actions,
runner, Temurin, workflow, and workflow artifact, with links to ADR-0010 and
ADR-0011.
Add GLOSSAIRE.md, the French counterpart of GLOSSARY.md, covering every
entry. Cross-link the two files with a note stating they must be kept in
sync, and reference the French version from the README documentation list.
@ebouchut ebouchut requested review from Copilot and removed request for Copilot July 7, 2026 12:49
@ebouchut ebouchut self-assigned this Jul 7, 2026
@ebouchut ebouchut added documentation Improvements or additions to documentation dependencies infrastructure config enhancement ci Continuous Integration labels Jul 7, 2026
@ebouchut ebouchut added this to the v0.9 - Code Freeze milestone Jul 7, 2026
@ebouchut ebouchut moved this to In Review in learn-dev-project Jul 7, 2026
@ebouchut ebouchut requested a review from Copilot July 7, 2026 12:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a GitHub Actions CI pipeline for the project, establishing automated build verification, test execution (with coverage reporting), and lint reporting on PRs to dev and pushes to dev/main. It also documents these CI decisions via ADRs and updates the project glossary (including a new French translation) to reflect the new tooling.

Changes:

  • Add three focused GitHub Actions workflows: Build (compile), Tests (test + JaCoCo artifact), and Lint (Checkstyle report + artifact).
  • Add Maven plugin configuration for Checkstyle (report-only) and JaCoCo (report generation during test).
  • Document CI architecture and “advisory-first” quality checks via ADRs; update docs/glossary to reflect CI concepts and add a French glossary translation.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
README.md Adds a link to the French glossary alongside the English glossary entry.
pom.xml Adds pinned Checkstyle + JaCoCo plugins (advisory reporting) to support CI lint and coverage artifacts.
GLOSSARY.md Notes French translation parity and adds CI/lint/coverage terminology aligned with the new pipeline.
GLOSSAIRE.md Adds a French translation of the glossary, including CI/lint/coverage vocabulary.
docs/plans/2026-07-06-ci-test-pipeline.md Records the executed implementation plan for the CI test pipeline.
docs/adr/README.md Updates ADR index to include the new CI-related ADRs (0010, 0011).
docs/adr/0011-start-ci-quality-checks-as-advisory-reports.md New ADR documenting why lint/coverage start as advisory reports.
docs/adr/0010-structure-ci-as-focused-workflows-per-concern.md New ADR documenting the “one workflow per concern” CI structure.
.github/workflows/test.yml Adds a CI workflow to run ./mvnw test and upload JaCoCo report artifacts.
.github/workflows/lint.yml Adds a CI workflow to run Checkstyle reporting and upload the XML report artifact (non-blocking).
.github/workflows/build.yml Adds a CI workflow to compile the project on PRs/pushes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Add a badge block above the README title showing the status of the Build,
Tests, Lint, and Schema drift workflows on dev, plus the open issue count,
using reference-style links defined at the bottom of the file (same layout
as the bet-no-loss project README). The Build, Tests, and Lint badges
display a status once this branch merges into dev and the first
push-triggered runs complete.
@ebouchut ebouchut merged commit 895d314 into dev Jul 7, 2026
3 of 4 checks passed
@ebouchut ebouchut deleted the ci-test-pipeline branch July 7, 2026 13:23
@github-project-automation github-project-automation Bot moved this from In Review to Done in learn-dev-project Jul 7, 2026
@ebouchut ebouchut changed the title Add the CI test pipeline (GitHub Actions) ci: Add the CI test pipeline (GitHub Actions) Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continuous Integration config dependencies documentation Improvements or additions to documentation enhancement infrastructure

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Configure Test coverage reports Add code quality checks (linting) Set up Unit Test automation Configure Maven build verification

2 participants