-
Notifications
You must be signed in to change notification settings - Fork 31
78 lines (70 loc) · 2.04 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Java CI with Maven
on:
push:
branches: [ master ]
tags: [ '*.*' ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 1.8
java-package: jdk
- run: mvn -B compile -DskipTests=true --file pom.xml
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
java: [8, 11, 13]
r: [3.6, 4.2, 4.3]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
java-package: jdk
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.r }}
- run: ln -s /Library/Frameworks/R.framework/Versions/3.6 /Library/Frameworks/R.framework/Versions/3.5
if: matrix.os == 'macos-latest'
- uses: GabrielBB/xvfb-action@v1.6
with:
run: mvn -B test --file pom.xml
id: mvntest
continue-on-error: true
- run: sudo apt-get install imagemagick
if: matrix.os == 'ubuntu-latest' && steps.mvntest.outcome != 'success'
- uses: OrbitalOwen/desktop-screenshot-action@0.1
if: matrix.os == 'ubuntu-latest' && steps.mvntest.outcome != 'success'
with:
file-name: 'test-${{ matrix.os }}-${{ matrix.java }}.jpg'
- uses: codecov/codecov-action@v1
- if: steps.mvntest.outcome != 'success'
run: exit 1
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 1.8
java-package: jdk
- run: mvn -B package -DskipTests=true --file pom.xml
- uses: actions/upload-artifact@v2
with:
path: target
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
target/rsession.jar
lib/*.jar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}