Skip to content

Commit

Permalink
chore(CI): add gradle build to tests (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinWitt committed Jan 2, 2022
1 parent 63f25d5 commit b9a976b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Java CI with Gradle

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Execute Gradle build
run: ./gradlew build
2 changes: 1 addition & 1 deletion code-transformation/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ spotless {
greclipse()
}
java {
eclipse().configFile('/src/main/resources/formatter-settings.xml')
eclipse().configFile(projectDir.toString() +'/src/main/resources/formatter-settings.xml')
}
allprojects {
repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void printerDoesNotCrash(@TempDir File tempRoot) throws IOException {
String resourcePath = "projects/bugs/AnnotationValuesTest.java";
File copy = TestHelper.createCopy(tempRoot, resourcePath, fileName);
List<TransformationCreator> transformations = createProcessorSupplier(v -> new TestAnnotation(v),
v -> new AssertionsTransformation(v));
v -> new AssertionsTransformation(v));
new TransformationHelper.Builder().path(tempRoot.getAbsolutePath())
.className("AnnotationValuesTest")
.processors(transformations)
Expand All @@ -77,7 +77,7 @@ public void printerDoesNotIncludeWhiteSpaceInInvocations(@TempDir File tempRoot)
String resourcePath = "projects/bugs/WhiteSpaces.java";
File copy = TestHelper.createCopy(tempRoot, resourcePath, fileName);
List<TransformationCreator> transformations = createProcessorSupplier(v -> new TestAnnotation(v),
v -> new AssertionsTransformation(v));
v -> new AssertionsTransformation(v));
new TransformationHelper.Builder().path(tempRoot.getAbsolutePath())
.className("WhiteSpaces")
.processors(transformations)
Expand Down

0 comments on commit b9a976b

Please sign in to comment.