Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 27, 2025

This PR migrates the Java Selenium Framework's continuous integration from Travis CI to GitHub Actions and resolves compatibility issues that were preventing successful test execution.

Migration Changes

GitHub Actions Workflow

  • Created .github/workflows/ci.yml with comprehensive CI configuration
  • Configured Java 8 runtime with Temurin distribution to match project configuration
  • Set up Firefox browser for Selenium testing with headless mode support
  • Implemented Maven dependency caching for faster build times
  • Added environment verification step for debugging
  • Configured artifact upload for test results and Allure reports

Test Execution

The workflow replicates the exact Travis CI test execution:

mvn clean test -Dspring.profiles.active=live -Dcountry=com -Dbrowser=firefox -Dmode=headless

Compatibility Fixes

Dependency Version Resolution

  • Fixed Spring Framework version incompatibility introduced by recent Dependabot update
  • Downgraded spring-web from 6.1.21 to 4.2.4.RELEASE for Java 8 compatibility
  • Ensured all Spring dependencies are consistent with Spring Boot 1.3.1.RELEASE

Java Version Alignment

  • Workflow uses Java 8 to match project's compilation target (<source>1.8</source>)
  • Removed Java 9+ specific --add-opens JVM arguments from Maven surefire plugin configuration
  • These arguments are incompatible with Java 8 and were causing workflow failures
  • Retained AspectJ javaagent configuration for Allure reporting functionality

WebDriver Stack Modernization

  • Updated Selenium WebDriver from 3.12.0 to 3.141.59 (latest Java 8 compatible version)
  • Upgraded geckodriver from 0.19.1 to 0.24.0 for better Firefox compatibility
  • Resolved WebDriver session creation failures that occurred with modern Firefox versions
  • Maintained full backward compatibility with existing test infrastructure

Configuration Improvements

  • Maintained MOZ_HEADLESS=1 environment variable from Travis setup
  • Configured 30-day retention for test artifacts
  • Updated README.md badge from Travis CI to GitHub Actions
  • Badge now points to: [![CI](https://github.com/edinc/java-selenium-framework/actions/workflows/ci.yml/badge.svg)](https://github.com/edinc/java-selenium-framework/actions/workflows/ci.yml)

Cleanup

  • Removed .travis.yml configuration file
  • No longer dependent on Travis CI infrastructure

Test Results

All tests now pass successfully: 2 tests run, 0 failures, 0 errors, 0 skipped

The migration successfully resolves the WebDriver compatibility issues that were causing test failures while maintaining full functionality of the existing test suite.

Benefits

  • Better Integration: Native GitHub integration with pull request checks
  • Improved Caching: Faster builds with Maven dependency caching
  • Enhanced Debugging: Environment verification and comprehensive artifact collection
  • Modern Platform: GitHub Actions provides better reliability and feature set
  • Resolved Compatibility: Fixed WebDriver version conflicts preventing test execution
  • Cost Effective: No external CI service dependencies

Fixes #24.


💡 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.

Copilot AI and others added 2 commits August 27, 2025 08:13
- Add GitHub Actions workflow (.github/workflows/ci.yml)
- Update README.md to use GitHub Actions badge
- Remove .travis.yml file
- Configure workflow to match Travis setup: Java 8, Firefox, headless tests

Co-authored-by: edinc <4791281+edinc@users.noreply.github.com>
- Upgrade to Java 11 for better compatibility
- Add environment verification step
- Add MAVEN_OPTS with --add-opens flags for newer Java versions
- Enhance workflow robustness

Co-authored-by: edinc <4791281+edinc@users.noreply.github.com>
Copilot AI changed the title [WIP] Switch from Travis build to GitHub Actions Switch from Travis CI to GitHub Actions Aug 27, 2025
Copilot AI requested a review from edinc August 27, 2025 08:16
@edinc
Copy link
Owner

edinc commented Aug 27, 2025

@copilot The workflow is faling. Can you check and fix?

- Change Java version from 11 to 8 to match project configuration
- Downgrade spring-web from 6.1.21 to 4.2.4.RELEASE for Java 8 compatibility
- Remove Java 11+ specific MAVEN_OPTS flags
- Ensure dependency versions are consistent with Spring Boot 1.3.1

Co-authored-by: edinc <4791281+edinc@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Aug 27, 2025

@copilot The workflow is faling. Can you check and fix?

I've fixed the workflow issue in commit 8073e72. The problem was a Java version compatibility issue:

Root Cause:

  • Recent Dependabot update introduced spring-web 6.1.21 (requires Java 17+)
  • Project configured for Java 8 compilation
  • GitHub Actions workflow was using Java 11

Fix Applied:

  1. Downgraded spring-web from 6.1.21 to 4.2.4.RELEASE (compatible with Java 8 & existing Spring Boot 1.3.1)
  2. Changed workflow from Java 11 to Java 8 to match project configuration
  3. Removed Java 11+ specific MAVEN_OPTS flags
  4. Verified compilation works locally

Current Status:
The latest workflow run shows "action_required" status, which likely means it needs manual approval in repository settings. The compilation issue has been resolved. You may need to approve the workflow run or check repository Actions settings.

Copilot AI changed the title Switch from Travis CI to GitHub Actions Switch from Travis CI to GitHub Actions and fix Java compatibility issues Aug 27, 2025
@edinc
Copy link
Owner

edinc commented Aug 27, 2025

@copilot it is still failing. Can you check?

Co-authored-by: edinc <4791281+edinc@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Aug 27, 2025

@copilot it is still failing. Can you check?

I've fixed the workflow failure in commit 9c55866. The issue was Java 9+ specific JVM arguments in the surefire plugin configuration:

Root Cause:
The Maven surefire plugin was configured with --add-opens JVM arguments (lines 97-99 in pom.xml) that are only supported in Java 9+, but the GitHub Actions workflow uses Java 8.

Fix Applied:
Removed the incompatible --add-opens arguments while preserving the AspectJ javaagent needed for Allure reporting. The build now works correctly with Java 8.

The workflow should now pass successfully.

@edinc
Copy link
Owner

edinc commented Aug 27, 2025

@copilot The workflow runs properly now. But there are test failures. Can you check those as well?

Co-authored-by: edinc <4791281+edinc@users.noreply.github.com>
@edinc
Copy link
Owner

edinc commented Aug 27, 2025

@copilot seems like firefox 70 cannot be downloaded. Is there another fix?

…fox compatibility

Co-authored-by: edinc <4791281+edinc@users.noreply.github.com>
@edinc edinc marked this pull request as ready for review August 27, 2025 09:01
@edinc edinc merged commit 7d04747 into master Aug 27, 2025
3 checks passed
@edinc edinc deleted the copilot/fix-24 branch August 27, 2025 09:02
Copy link
Contributor Author

Copilot AI commented Aug 27, 2025

@copilot The workflow runs properly now. But there are test failures. Can you check those as well?

Fixed the test failures in commit 5983ff1. The issue was outdated Selenium/Firefox compatibility. Updated Selenium from 3.12.0 to 3.141.59 and geckodriver from 0.19.1 to 0.24.0 for better modern Firefox support. All tests now pass: 2 tests run, 0 failures, 0 errors.

Copilot AI restored the copilot/fix-24 branch August 27, 2025 09:03
Copilot AI changed the title Switch from Travis CI to GitHub Actions and fix Java compatibility issues Migrate from Travis CI to GitHub Actions and fix compatibility issues Aug 27, 2025
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.

Switch from Travis build to GitHub Actions

2 participants