blob: b07db751e05c8d3a21ee5170ff562e8c1b1d13b5 [file] [log] [blame]
#
# 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
#
# http://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: Camel Quarkus CI
on:
push:
branches:
- master
- camel-quarkus-master
paths-ignore:
- '**.adoc'
- 'Jenkinsfile'
- 'KEYS'
- 'LICENSE.txt'
- 'NOTICE.txt'
pull_request:
branches:
- master
- camel-quarkus-master
paths-ignore:
- '**.adoc'
- 'Jenkinsfile'
- 'KEYS'
- 'LICENSE.txt'
- 'NOTICE.txt'
env:
LANG: en_US.UTF-8
MAVEN_OPTS: -Xmx3000m
MAVEN_ARGS: -V -ntp -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -e
jobs:
mvn-verify:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: n1hility/cancel-previous-runs@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up JDK 11
uses: AdoptOpenJDK/install-jdk@v1
with:
version: '11'
- name: Checkout
uses: actions/checkout@v2
- name: Build Camel Quarkus
if: github.ref == 'refs/heads/camel-quarkus-master' || github.base_ref == 'camel-quarkus-master'
run: |
git clone --depth 1 --branch master https://github.com/apache/camel-quarkus.git ${{ runner.temp }}/camel-quarkus \
&& cd ${{ runner.temp }}/camel-quarkus \
&& echo "Current Camel Quarkus commit:" $(git rev-parse HEAD) \
&& ./mvnw ${MAVEN_ARGS} clean install -DskipTests -Denforcer.skip -Dquarkus.build.skip
- name: mvn license:check formatter:validate impsort:check cq:sync-example-properties
run: |
./mvnw-for-each.sh ${MAVEN_ARGS} \
license:check \
net.revelc.code.formatter:formatter-maven-plugin:validate \
net.revelc.code:impsort-maven-plugin:check \
org.l2x6.cq:cq-maven-plugin:0.25.0:sync-example-properties
- name: mvn clean verify -Pnative,docker
run: |
./mvnw-for-each.sh ${MAVEN_ARGS} clean verify -Pnative,docker
- name: Fail if there are uncommitted changes
shell: bash
run: |
[[ -z $(git status --porcelain) ]] || { echo 'There are uncommitted changes'; git status; exit 1; }