Skip to content
Open
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
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Java CI with Gradle

on:
push:
pull_request:

jobs:
test:
strategy:
matrix:
jdk-version: [8, 11, 17]

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.jdk-version }}
distribution: temurin
- name: Make gradlew executable
run: chmod +x gradlew
- name: Build with Gradle
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
with:
arguments: test
- name: Process Errors
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Gradle test (Java ${{matrix.jdk-version}})
path: build/test-results/test/*.xml
reporter: java-junit
11 changes: 11 additions & 0 deletions .github/workflows/error-filter.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/python3
import sys
import re

_in = sys.stdin.read()
for match in re.finditer(r"(\S+\.(\w+)) > (\S+) FAILED\n\s*(.*)(?:.*\n)*?.*\(\2\.java:(\d+)", _in):
file = 'src/test/java/' + match[1].replace('.', '/') + '.java'
line = match[5]
title = match[3]
message = match[4]
print(f"::error file={file},line={line},title=Failed in {title}::{message}")