Skip to content

Fix CI workflow to run modern and legacy tests with proper isolation#1102

Closed
yingbull with Copilot wants to merge 2 commits into
maintenancefrom
copilot/fix-github-pipeline-tests
Closed

Fix CI workflow to run modern and legacy tests with proper isolation#1102
yingbull with Copilot wants to merge 2 commits into
maintenancefrom
copilot/fix-github-pipeline-tests

Conversation

Copilot AI commented Jan 7, 2026

Copy link
Copy Markdown

CI build failing because modern (JUnit 5) and legacy (JUnit 4) tests run together without proper isolation, causing Spring context conflicts. The make script handles this correctly by running tests in separate phases.

Changes

  • Phase 1 - Modern tests: Build with -Pmodern-tests -DskipLegacyTests=true and modern lock file
  • Phase 2 - Legacy tests: Clean, rebuild without modern profile, run with -DskipModernTests=true
  • Added -T 1C for multi-threaded builds matching make script behavior

Before

- name: Run unit tests & build JSP files
  run: docker exec openo-tomcat-dev mvn package -Pjspc,modern-tests -Ddependency.lock.filename=dependencies-lock-modern.json

After

# Phase 1: Modern tests
- name: Build for modern tests
  run: docker exec openo-tomcat-dev mvn clean -DskipModernTests=true -DskipLegacyTests=true -T 1C package war:exploded -Pjspc,modern-tests -Ddependency.lock.filename=dependencies-lock-modern.json

- name: Run modern tests
  run: docker exec openo-tomcat-dev mvn test -Pmodern-tests -DskipLegacyTests=true -Ddependency.lock.filename=dependencies-lock-modern.json

- name: Clean up between test phases
  run: docker exec openo-tomcat-dev mvn clean -q

# Phase 2: Legacy tests  
- name: Build for legacy tests
  run: docker exec openo-tomcat-dev mvn clean -DskipModernTests=true -DskipLegacyTests=true -T 1C package war:exploded -Pjspc

- name: Run legacy tests
  run: docker exec openo-tomcat-dev mvn test -DskipModernTests=true

Mirrors the isolation approach in .devcontainer/development/scripts/make when running make install --run-tests.

Original prompt

Currently the build test for the github pipeline is failing because the scripts to run it are not properly running the seperate test and legacy tests with the right scope, as the "make" script in the dev container does. Fix this so does not fail because of this issue.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…tion

Co-authored-by: yingbull <8680161+yingbull@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix build test failure in GitHub pipeline Fix CI workflow to run modern and legacy tests with proper isolation Jan 7, 2026
Copilot AI requested a review from yingbull January 7, 2026 01:37
@github-actions

github-actions Bot commented Jan 7, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@keploy

keploy Bot commented Jan 15, 2026

Copy link
Copy Markdown

To generate Unit Tests for this PR, please click here.

@yingbull

yingbull commented Feb 1, 2026

Copy link
Copy Markdown

Unable to reassign; closing. Can be reopened by openosp. @kk-chung

@yingbull

yingbull commented Feb 1, 2026

Copy link
Copy Markdown

Unable to reassign; requesting close. Can be reopened by openosp. @kk-chung

@lacarmen lacarmen removed the request for review from yingbull February 2, 2026 18:32
@sebastian-j-ibanez sebastian-j-ibanez changed the base branch from develop to maintenance March 13, 2026 22:27
@sebastian-j-ibanez

Copy link
Copy Markdown
Collaborator

Closing - creating different builds for the modern and legacy tests was addressed in PR #1792.

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.

3 participants