98 lines (93 loc) · 2.66 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Java CI with Maven (Linux)
on:
push:
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
jobs:
tycho-build:
env:
DISPLAY: :1
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.5.0
- name: Set up JDK 11
uses: actions/setup-java@v3.6.0
with:
java-version: 11
distribution: temurin
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: |
~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml', '**/*.target') }}
restore-keys: ${{ runner.os }}-m2-
- name: Install and start Metacity window manager
run: |
sudo apt-get update
sudo apt-get install xvfb metacity
Xvfb :1 &
sleep 5
metacity --sm-disable --replace 2> metacity.err &
- name: Build with Maven
run: >
./mvnw -f releng/org.eclipse.emf.parsley.parent/pom.xml
-Prcp-build
-Pjacoco
clean verify
-DrepoToken=$COVERALLS_REPO_TOKEN
-DpullRequest=${{ github.event.pull_request.number }}
coveralls:report
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
- name: Archive UI Tests Screenshots
uses: actions/upload-artifact@v2
if: ${{ failure() || cancelled() }}
with:
name: screenshots-${{ runner.os }}
path: '**/screenshots'
- name: Archive Logs
uses: actions/upload-artifact@v2
if: ${{ failure() || cancelled() }}
with:
name: logs-${{ runner.os }}
path: '**/target/work/data/.metadata/.log'
- name: Archive Coverage Report
uses: actions/upload-artifact@v2
if: ${{ success() }}
with:
name: jacoco-coverage-${{ runner.os }}
path: '**/site/jacoco-aggregate'
maven-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.5.0
- name: Set up JDK 11
uses: actions/setup-java@v3.6.0
with:
java-version: 11
distribution: temurin
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: |
~/.m2
!~/.m2/**/*parsley*
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml', '**/*.target') }}
restore-keys: ${{ runner.os }}-maven-
# for the examples our Parsley bundles must be installed
# so we exclude them from the cache
- name: Build with Maven
run: >
./mvnw -f releng/org.eclipse.emf.parsley.parent/pom.xml
-Pmaven
clean install
- name: Build Maven example
run: >
xvfb-run
./mvnw -f examples/org.eclipse.emf.parsley.examples.maven
-Pmaven
clean verify