-
Notifications
You must be signed in to change notification settings - Fork 15
46 lines (39 loc) · 1.9 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
43
44
45
46
name: tests
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
java-version: [8, 11, 16, 17]
compiler-version: [1.1, 1.2, 1.3, 1.4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
os: [ ubuntu-latest , macos-latest , windows-latest ]
exclude:
- os: macos-latest
java-version: 8
- os: macos-latest
java-version: 16
steps:
- name: Checkout
uses: actions/checkout@v4.2.0
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@v4.4.0
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: 'temurin'
- 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/codecov-action@v4.6.0
if: ${{ matrix.compiler-version == 8 && matrix.java-version == 8 && matrix.os == 'ubuntu-latest' }}