-
Notifications
You must be signed in to change notification settings - Fork 5
44 lines (40 loc) · 1.19 KB
/
build.yml
File metadata and controls
44 lines (40 loc) · 1.19 KB
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
# This workflow will generate javadocs, build, and test a package using Maven
name: build
on:
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Maven
run: mvn -B compile --file pom.xml
# generate the javadocs into the target/site/apidocs folder (default)
- name: Generate javadocs with Maven
run: mvn javadoc:javadoc
unit-tests:
runs-on: ubuntu-latest
# only run this if we have already generated javadocs in last commit
steps:
- name: Checkout the latest code
uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Create credentials file
run: 'echo "$CREDENTIALS_FILE" > ./src/test/resources/credentials.json'
shell: bash
env:
CREDENTIALS_FILE: ${{secrets.TEST_CREDENTIALS}}
- name: Test with Maven
run: mvn test --fail-at-end --file pom.xml
- name: Publish Test Report
if: ${{ always() }}
uses: scacap/action-surefire-report@v1