Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 41 additions & 1 deletion .github/workflows/pr-java-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,44 @@ jobs:
java-version: ${{ matrix.java }}

- name: Build with Maven
run: mvn -B package --file extra/pom.xml
id: build
run: |
mvn -B package --file extra/pom.xml | tee build_output.txt
echo "exit_code=$result" >> "$GITHUB_OUTPUT"
- name: Format build output for PR comment
if: steps.build.outputs.exit_code != '0'
run: |
if grep -q '\[INFO\] Starting audit\.\.\.' build_output.txt; then
{
echo "❌ **Checkstyle Issues Detected**"
echo ""
echo '```'
sed -n '/\[INFO\] Starting audit\.\.\./,/Audit done\./p' build_output.txt | sed '0,/Audit done\./d'
echo '```'
} > comment.txt
else
{
echo "❌ **Java CI Test Failures**"
echo ""
echo '```'
sed -n '/\[ERROR\] Failures:/,/\[ERROR\] Tests run:/p' build_output.txt
echo '```'
} > comment.txt
fi
- name: Print comment.txt content
if: always() # Ensures this runs even if a previous step failed
run: |
echo "------ comment.txt content ------"
cat comment.txt || echo "comment.txt not found"
echo "--------------------------------"
- name: Comment on PR with build failure output
if: steps.build.outputs.exit_code != '0'
uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.pull_request.number }}
body-path: comment.txt

- name: Fail if error is found in logs
if: steps.build.outputs.exit_code != '0'
run: exit 1
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ class AbTestingModuleSpec extends ModuleBaseSpec {
then: "PBS response should include trace information about called modules"
def invocationResults = response?.ext?.prebid?.modules?.trace?.stages?.outcomes?.groups?.invocationResults?.flatten() as List<InvocationResult>
verifyAll(invocationResults) {
it.status == [SUCCESS, SUCCESS]
it.action == [NO_ACTION, NO_ACTION]
it.status == [null, SUCCESS]
it.action == [NO_ACTION, null]
}

and: "Shouldn't include any analytics tags"
Expand Down
Loading