| description | Build Test Java | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| true |
|
|||||||||||||
| roles | all | |||||||||||||
| permissions |
|
|||||||||||||
| name | Build Test Java | |||||||||||||
| engine | copilot | |||||||||||||
| runtimes |
|
|||||||||||||
| network |
|
|||||||||||||
| tools |
|
|||||||||||||
| sandbox |
|
|||||||||||||
| safe-outputs |
|
|||||||||||||
| timeout-minutes | 15 | |||||||||||||
| strict | true | |||||||||||||
| env |
|
IMPORTANT: Keep all outputs concise. Report results clearly with pass/fail status.
Clone and test the following projects from the test repository:
-
Clone Repository:
gh repo clone Mossaka/gh-aw-firewall-test-java /tmp/test-java- CRITICAL: If clone fails, immediately call
safeoutputs-missing_toolwith message "CLONE_FAILED: Unable to clone test repository" and stop execution
- CRITICAL: If clone fails, immediately call
-
Configure Maven Proxy: Maven ignores Java system properties for proxy configuration, so you must create
~/.m2/settings.xmlbefore running any Maven commands. IMPORTANT: Use the literal valuessquid-proxyand3128directly in the XML - do NOT use shell variables or environment variable syntax:mkdir -p ~/.m2 cat > ~/.m2/settings.xml << 'SETTINGS' <settings> <proxies> <proxy> <id>awf-http</id><active>true</active><protocol>http</protocol> <host>squid-proxy</host><port>3128</port> </proxy> <proxy> <id>awf-https</id><active>true</active><protocol>https</protocol> <host>squid-proxy</host><port>3128</port> </proxy> </proxies> </settings> SETTINGS
-
Test Projects:
gson:cd /tmp/test-java/gson && mvn compile && mvn testcaffeine:cd /tmp/test-java/caffeine && mvn compile && mvn test
-
For each project, capture:
- Compile success/failure
- Test pass/fail count
- Any error messages
Add a comment to the current pull request with a summary table:
| Project | Compile | Tests | Status |
|---|---|---|---|
| gson | ✅/❌ | X/Y | PASS/FAIL |
| caffeine | ✅/❌ | X/Y | PASS/FAIL |
Overall: PASS/FAIL
If ALL tests pass, add the label build-test-java to the pull request.
If ANY test fails, report the failure with error details.
CRITICAL: This workflow MUST fail visibly when errors occur:
- Clone failure: If repository clone fails, call
safeoutputs-missing_toolwith "CLONE_FAILED: [error message]" - Build failure: Report in comment table with ❌ and include error output
- Test failure: Report in comment table with FAIL status and include failure details
DO NOT report success if any step fails. The workflow should produce a clear, actionable error message.