-
Notifications
You must be signed in to change notification settings - Fork 15
42 lines (34 loc) · 1.79 KB
/
tests.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
name: tests
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
java-version: [ 8 , 11 , 14 , 16 ]
compiler-version: [ 1.1 , 1.2 , 1.3 , 1.4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 ]
os: [ ubuntu-latest , macos-latest , windows-latest ]
steps:
- name: Checkout
uses: actions/[email protected]
if: ${{ matrix.compiler-version <= matrix.java-version && (matrix.java-version < 14 || matrix.compiler-version >= 7) && (matrix.java-version < 11 || matrix.compiler-version >= 6) }}
- name: Setup JDK${{ matrix.java-version }}
uses: actions/setup-java@v2
if: ${{ matrix.compiler-version <= matrix.java-version && (matrix.java-version < 14 || matrix.compiler-version >= 7) && (matrix.java-version < 11 || matrix.compiler-version >= 6) }}
with:
java-version: ${{ matrix.java-version }}
distribution: 'adopt'
- name: Install example projects
run: ./.github/install_examples.sh
if: ${{ matrix.compiler-version <= matrix.java-version && (matrix.java-version < 14 || matrix.compiler-version >= 7) && (matrix.java-version < 11 || matrix.compiler-version >= 6) }}
shell: bash
env:
SRC_VERSION: ${{ matrix.compiler-version }}
- name: Build and run tests
run: mvn --batch-mode clean test
if: ${{ matrix.compiler-version <= matrix.java-version && (matrix.java-version < 14 || matrix.compiler-version >= 7) && (matrix.java-version < 11 || matrix.compiler-version >= 6) }}
env:
SRC_VERSION: ${{ matrix.compiler-version }}
- name: Codecov
uses: codecov/[email protected]
if: ${{ matrix.compiler-version == 8 && matrix.java-version == 8 && matrix.os == 'ubuntu-latest' }}