-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (47 loc) · 1.56 KB
/
maven.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java CI with Maven
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Run Sorald Buildbreaker
uses: SpoonLabs/sorald-buildbreaker@45bafb6db29a466080328864cecf9b20d9ace3de
with:
source: 'src/main/java'
- name: Build project
run: mvn compile
- name: Build jar with dependencies
run: |
mvn compile assembly:single
java -jar target/diffmin-1.0-SNAPSHOT-jar-with-dependencies.jar \
src/test/resources/delete/literal/PREV_DeleteLiteral.java \
src/test/resources/delete/literal/NEW_DeleteLiteral.java
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 15 for compiling test resources
uses: actions/setup-java@v1
with:
java-version: 15
- name: Verify if test resources compile
run: ./scripts/verify-test-resource.sh
- name: Set up JDK 11 for running tests
uses: actions/setup-java@v1
with:
java-version: 11
- name: Style check using spotless
run: 'mvn spotless:check'
- name: Style check using checkstyle
run: 'mvn checkstyle:check'
- name: Run test phase
run: mvn test
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v1