-
Notifications
You must be signed in to change notification settings - Fork 99
39 lines (38 loc) · 1.46 KB
/
jgiven_branch_and_pr_build.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
name: Java CI with Gradle
on: [push, pull_request]
jobs:
build:
name: Build JGiven on Java ${{ matrix.java }} with Junit ${{matrix.junit}}
runs-on: ubuntu-latest
env:
ANDROID: true
strategy:
matrix:
java: [ '11', '17', '19']
junit: ['4.13.2']
steps:
- name: Ensure chrome is installed
run: wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && sudo apt install ./google-chrome-stable_current_amd64.deb && rm *.deb
- uses: actions/[email protected]
- name: Set up JDK ${{matrix.java}}
uses: actions/[email protected]
with:
java-version: ${{matrix.java}}
distribution: 'adopt'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle and Junit ${{matrix.junit}}
env:
JUNIT_VERSION: ${{matrix.junit}}
run: "./gradlew -i -s check -DjunitVersion=${JUNIT_VERSION}"
- name: Run Jacoco
if: ${{matrix.java == '11' && github.ref == 'refs/heads/master' && github.head_ref == null}}
run: ./gradlew overallJacocoReport coveralls
- name: Upload test results html files
continue-on-error: true
if: ${{failure()}}
uses: actions/[email protected]
with:
name: test-report_${{matrix.java}}_${{matrix.junit}}
path: /home/runner/work/JGiven/JGiven/*/build/reports/tests
if-no-files-found: ignore