Skip to content

Commit

Permalink
Add github action to validate maven 4 build compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
iemejia committed Dec 26, 2022
1 parent f55dbb8 commit 72cc630
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/maven4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: 'Maven 4'
on:
workflow_dispatch:
push:
branches: [ master ]
pull_request:
branches: [ master ]
paths:
- .github/workflows/maven4.yml
- lang/java/**

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
maven4:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Cache Local Maven Repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache Maven 4 Build Cache
uses: actions/cache@v3
with:
path: ~/.m2/build-cache
key: ${{ runner.os }}-maven-build-cache-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-build-cache
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'

- name: Set up Maven 4
uses: stCarolas/setup-maven@v4.5
with:
maven-version: 4.0.0-alpha-3

- name: Check Maven Version
run: mvn --version

- name: Run Build
run: mvn clean package

0 comments on commit 72cc630

Please sign in to comment.