forked from pyvandenbussche/sparqles
-
Notifications
You must be signed in to change notification settings - Fork 1
73 lines (65 loc) · 2.29 KB
/
backend.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
# 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://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: CI Backend (Java/Maven)
on:
workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'ci:full') }}
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
# jdk: ['11']
# # temurin is Eclipse/AdoptOpenJDK/Adoptium
# # 'liberica' is a preferred Spring SDK
# # zulu has 2030 EOL for JDK 8
# distribution: ['zulu']
# experimental: [false]
include:
- jdk: '17'
distribution: temurin
experimental: true
- jdk: '21'
distribution: liberica
experimental: true
- jdk: '23'
# current, can test on Oracle JDK while it's supported for 6mo
distribution: oracle
experimental: true
- jdk: '24-ea'
distribution: zulu
experimental: true
continue-on-error: ${{ matrix.experimental }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.jdk }}
distribution: ${{ matrix.distribution }}
cache: maven
- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-${{ matrix.jdk }}_${{ matrix.distribution }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.jdk }}_${{ matrix.distribution }}-maven-
- name: Build with Maven
run: |
cd backend
mvn -B clean verify
- name: Build the Docker image
working-directory: backend
run: docker build .