-
Notifications
You must be signed in to change notification settings - Fork 77
35 lines (33 loc) · 979 Bytes
/
main.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
name: Java CI
on:
pull_request:
push:
branches:
- main
jobs:
test:
name: Package and run all tests
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Init Coveralls
shell: bash
run: |
COVERALLS_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}
if [[ -z "${COVERALLS_TOKEN}" ]];
then
echo "Coveralls token not available"
COVERALLS_SKIP=true
else
echo "Coveralls token available"
COVERALLS_SKIP=false
fi
echo "COVERALLS_SKIP=${COVERALLS_SKIP}" >> $GITHUB_ENV
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 8
- name: Run Maven Targets
run: mvn package jacoco:report coveralls:report --batch-mode --show-version --activate-profiles coveralls -Dcoveralls.skip=${COVERALLS_SKIP} -DrepoToken=${{ secrets.COVERALLS_REPO_TOKEN }}