-
Notifications
You must be signed in to change notification settings - Fork 25
49 lines (41 loc) · 1.33 KB
/
pr-check.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
name: Build and Test
on: pull_request
jobs:
test:
runs-on: ${{ matrix.os }} # compiles and test on Ubuntu
strategy:
matrix:
os: [ubuntu-latest]
java: ["1.8"]
fail-fast: false
steps:
- name: Checkout PR branch
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
# Java JDK 11 used for maven build
- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk
architecture: x64
# Try to find and apply jbosstools cache
- name: Cache local Maven repository for JBoss Tools components
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: jboss-stacks-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
jboss-stacks-${{ runner.os }}-maven-
# Build and compile using Maven
- name: Build/Compile and run unit tests
run: mvn verify -B --no-transfer-progress
# Archive artifacts to be applied in Publish Reports workflow
- name: Archiving test artifacts
uses: actions/upload-artifact@v2
if: always()
with:
name: ${{ matrix.os }}-test-reports
path: |
target/surefire-reports/