-
Notifications
You must be signed in to change notification settings - Fork 61
46 lines (41 loc) · 1.6 KB
/
jobs-maven.yaml
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
# This workflow is not automatically triggered, but needs to be
# called from e.g. another workflow file. It enables us to
# reuse the jobs run here in different workflows.
# Please note that in order to run this jobs, the
# code needs to be checked already out when using the job
# 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: Java CI with Maven
env:
NODE_VERSION: 18
on:
workflow_call
permissions:
contents: read
jobs:
build:
strategy:
matrix:
java-version: [17, 21]
runs-on: [ubuntu-latest]
name: Jdk ${{ matrix.java-version }}, os ${{ matrix.runs-on }}
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
with:
persist-credentials: false
- name: Setup node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install node.js uglify packages
run: npm install uglify-js -g && npm install uglifycss -g
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
with:
distribution: 'temurin'
java-version: ${{ matrix.java-version }}
cache: maven
- name: Build and run tests with Maven
run: mvn --batch-mode --update-snapshots verify