-
-
Notifications
You must be signed in to change notification settings - Fork 267
51 lines (44 loc) · 1.16 KB
/
build.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
name: Build and Test BaseX
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-and-test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
# Checkout the repository
- name: Checkout code
uses: actions/checkout@v4
# Set up Java
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
# Cache Maven dependencies
- name: Cache Maven dependencies
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: maven-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
maven-${{ runner.os }}-
# Build the project using Maven
- name: Build with Maven
run: mvn clean install
# Archive test reports and possible dumps in case of failure
- name: Upload test results
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-results
path: |
'**/target/surefire-reports/**/*.xml'
'**/*.dump'
'**/*.dumpstream'