-
Notifications
You must be signed in to change notification settings - Fork 0
109 lines (91 loc) · 2.9 KB
/
buildtest.yml
File metadata and controls
109 lines (91 loc) · 2.9 KB
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
# 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: Build and Test
on:
push:
branches: [ '*' ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout completely
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Check design-mode dependency version
run: |
! egrep '<qe-version>([^<]+)<\/qe-version>' query-engine-design-mode/pom.xml
- name: Cache Maven packages
uses: actions/cache@v5
with:
path: ~/.m2
key: ${{ runner.os }}-m2
restore-keys: ${{ runner.os }}-m2
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
java-version: '25'
distribution: 'zulu'
cache: maven
- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.6
- name: Build with Maven
env:
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
run: mvn -P ui --no-transfer-progress -B clean install site --file pom.xml
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: target/site/jacoco/jacoco.xml
flags: unittests
fail_ci_if_error: false
verbose: true
- name: Tidy up old query-engine package versions
uses: actions/delete-package-versions@v5
continue-on-error: true
with:
package-name: 'query-engine'
package-type: container
min-versions-to-keep: 20
num-old-versions-to-delete: 0
delete-only-pre-release-versions: "true"
- name: Tidy up old query-engine-design-mode package versions
uses: actions/delete-package-versions@v5
continue-on-error: true
with:
package-name: 'query-engine-design-mode'
package-type: container
min-versions-to-keep: 20
num-old-versions-to-delete: 0
delete-only-pre-release-versions: "true"
- name: Login to GitHub Container Registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Upload site reports on success
uses: actions/upload-artifact@v7
if: success()
with:
name: reports
retention-days: 10
path: |
query-engine/target/site
query-engine-design-mode/target/site
- name: Upload site reports on failure
uses: actions/upload-artifact@v7
if: failure()
with:
name: reports
retention-days: 2
path: |
query-engine/target/site
query-engine-design-mode/target/site
- name: Clean up settings.xml
run: |
rm "${HOME}/.m2/settings.xml"