Skip to content

ci: add GitHub Actions workflow for build and unit tests - #150

Open
QuigProQuo wants to merge 1 commit into
nysenate:devfrom
QuigProQuo:add-ci-workflow
Open

ci: add GitHub Actions workflow for build and unit tests#150
QuigProQuo wants to merge 1 commit into
nysenate:devfrom
QuigProQuo:add-ci-workflow

Conversation

@QuigProQuo

Copy link
Copy Markdown

What

Adds a GitHub Actions CI workflow (.github/workflows/ci.yml) that runs on every push and PR to the dev branch.

Why

The repository currently has no CI/CD pipeline at all — no GitHub Actions, no Travis, no Jenkins. This means:

  • Builds and tests are only run if a developer remembers to do so locally
  • Broken code can reach dev without detection
  • There's no automated signal for PR reviewers

This PR adds the foundational CI step: build + unit tests on every push/PR.

What It Does

Step Action Why
Checkout actions/checkout@v4 Get the code
Set up JDK 21 actions/setup-java@v4 (Temurin 21, Maven cache) Matches pom.xml <release>21</release>
Set up Node.js 20 actions/setup-node@v4 (npm cache) Frontend assets built via npm ci during Maven generate-sources
Compile mvn compile -B Verifies Java + webpack build succeeds
Unit tests mvn test -B Runs Surefire (@UnitTest group — currently 356 tests, 0 failures)

What It Doesn't Do (Yet)

This is intentionally a minimal first step. Future improvements:

  • Integration tests (mvn verify) — requires PostgreSQL + Elasticsearch service containers; should be a separate job
  • Flyway migration validation — requires a PostgreSQL service container
  • Dependency scanning — can be added via Dependabot or OWASP Dependency-Check
  • Security scanning — CodeQL or Semgrep

These can be added incrementally once this basic workflow is merged.

Verification

I ran mvn compile and mvn test locally before submitting this PR:

  • mvn compileBUILD SUCCESS (Java + webpack frontend)
  • mvn testBUILD SUCCESS, 356 tests, 0 failures, 0 errors, 5 skipped

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.

1 participant