-
Notifications
You must be signed in to change notification settings - Fork 8
53 lines (47 loc) · 2.05 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
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java CI with Maven
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
eclipse-release: ['2020-03', '2020-06', '2020-09', '2020-12', '2021-03', '2021-06', '2021-09', '2021-12', '2022-03', '2022-06']
env:
integration-test-release: '2020-03'
steps:
- uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: build config
run: mvn -B install --settings settings.xml --file codequality-config/pom.xml
- name: Check compiles
run: mvn -B clean package --settings settings.xml --file pom.xml -T1C -Dtarget-platform=eclipse-${{ matrix.eclipse-release }} -DskipTests -Dtycho.p2.transport.min-cache-minutes=1440
if: ${{ matrix.eclipse-release != env.integration-test-release }}
- name: Run Integration Tests
uses: GabrielBB/xvfb-action@v1
with:
run: mvn -B clean verify --settings settings.xml --file pom.xml -T1C -Dtarget-platform=eclipse-${{ matrix.eclipse-release }} -Dmaven.test.failure.ignore=true -Dtycho.p2.transport.min-cache-minutes=1440
if: ${{ matrix.eclipse-release == env.integration-test-release }}
- name: Upload Test Results
uses: actions/upload-artifact@v2
with:
name: test-results-${{ matrix.eclipse-release }}
if-no-files-found: error
path: |
${{ github.workspace }}/**/target/surefire-reports/*.xml
if: ${{ matrix.eclipse-release == env.integration-test-release }}