-
Notifications
You must be signed in to change notification settings - Fork 25
108 lines (106 loc) · 3.66 KB
/
test.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
99
100
101
102
103
104
105
106
107
108
name: Automated tests
on:
push:
branches: [main, staging, trying]
pull_request:
branches: [main]
jobs:
test_jdk8:
name: Execute all automated tests JDK 8
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-8-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-8-
- name: Cache test corpora
uses: actions/cache@v4
with:
path: "*.zip"
key: ${{ runner.os }}-corpora-${{ hashFiles('misc/import-test-corpora.sh') }}
- name: Set JAVA_HOME to included JDK 8
run: echo JAVA_HOME=$JAVA_HOME_8_X64 >> $GITHUB_ENV
- run: misc/download-annis-cli.sh
env:
OS_NAME: linux
- run: misc/import-test-corpora.sh
- name: Run Maven install (includes tests)
run: mvn install
test_jdk11:
name: Execute all automated tests on JDK 11
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# Otherwise the new code can't be determined or code coverage is less informing
fetch-depth: 0
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-11-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-11-
- name: Cache test corpora
uses: actions/cache@v2
with:
path: "*.zip"
key: ${{ runner.os }}-corpora-${{ hashFiles('misc/import-test-corpora.sh') }}
- name: Set JAVA_HOME to included JDK 11
run: echo JAVA_HOME=$JAVA_HOME_11_X64 >> $GITHUB_ENV
- run: misc/download-annis-cli.sh
env:
OS_NAME: linux
- run: misc/import-test-corpora.sh
- name: Run Maven install (includes tests)
run: mvn install
test_jdk17:
name: Execute all automated tests on JDK 17
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# Otherwise the new code can't be determined or code coverage is less informing
fetch-depth: 0
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-11-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-11-
- name: Cache test corpora
uses: actions/cache@v2
with:
path: "*.zip"
key: ${{ runner.os }}-corpora-${{ hashFiles('misc/import-test-corpora.sh') }}
- name: Set JAVA_HOME to included JDK 17
run: echo JAVA_HOME=$JAVA_HOME_17_X64 >> $GITHUB_ENV
- run: misc/download-annis-cli.sh
env:
OS_NAME: linux
- run: misc/import-test-corpora.sh
- name: Run Maven Tests with enabled code coverage and upload results to SonarCloud
run: mvn -Pcoverage install sonar:sonar -Dsonar.projectKey=korpling_ANNIS -Dsonar.organization=korpling -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
test_docs:
name: Test documentation
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- run: misc/download-mdbook.sh 0.4.17
env:
OS_NAME: linux
- run: mdbook build docs/user-guide/
- run: mdbook build docs/developer-guide/
- run: mdbook build docs/online-help/