Debian Codegraph @

.github/workflows/maven4.yml

raw
1 # Licensed to the Apache Software Foundation (ASF) under one or more
2 # contributor license agreements. See the NOTICE file distributed with
3 # this work for additional information regarding copyright ownership.
4 # The ASF licenses this file to You under the Apache License, Version 2.0
5 # (the "License"); you may not use this file except in compliance with
6 # the License. You may obtain a copy of the License at
7 #
8 # https://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15
16 name: 'Maven 4'
17 on:
18 workflow_dispatch:
19 push:
20 branches: [ main ]
21 pull_request:
22 branches: [ main ]
23 paths:
24 - .github/workflows/maven4.yml
25 - lang/java/**
26
27 concurrency:
28 group: ${{ github.workflow }}-${{ github.ref }}
29 cancel-in-progress: true
30
31 jobs:
32 maven4:
33 runs-on: ubuntu-latest
34 steps:
35 - uses: actions/checkout@v5
36
37 - name: Cache Local Maven Repository
38 uses: actions/cache@v4
39 with:
40 path: ~/.m2/repository
41 key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
42 restore-keys: |
43 ${{ runner.os }}-maven-
44
45 - name: Cache Maven 4 Build Cache
46 uses: actions/cache@v4
47 with:
48 path: ~/.m2/build-cache
49 key: ${{ runner.os }}-maven-build-cache-${{ hashFiles('**/pom.xml') }}
50 restore-keys: |
51 ${{ runner.os }}-maven-build-cache
52
53 - name: 'Setup Temurin JDK 8, 11, 17 & 21'
54 uses: actions/setup-java@v5
55 with:
56 distribution: 'temurin'
57 java-version: |
58 8
59 11
60 17
61 21
62
63 - name: Setup Maven 4
64 uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 # v5
65 with:
66 maven-version: 4.0.0-alpha-10
67
68 - name: Test
69 run: mvn clean verify