Skip to content

chore: add ci

chore: add ci #2

Workflow file for this run

# 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: CI
on:
push:
branches: ['develop/**', 'release/**']
pull_request:
branches: ['develop/**', 'release/**']
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
MAVEN_ARGS: -B -V -e -ntp
MAVEN_COMMON_FLAGS: >-
-Dhbase.profile=2.6
-Drat.skip=true
-Dmaven.javadoc.skip=true
jobs:
compile:
name: Compile
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
cache: maven
server-id: arenadata
server-username: GITHUB_ACTOR
server-password: GITHUB_TOKEN
- name: Compile
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: >-
mvn ${{ env.MAVEN_ARGS }} install -DskipTests
${{ env.MAVEN_COMMON_FLAGS }} -Pbuild-with-jdk17
- name: Save m2 repository
uses: actions/cache/save@v4
with:
path: ~/.m2/repository
key: m2-${{ github.sha }}
test:
name: Unit Tests
needs: compile
runs-on: ubuntu-24.04
timeout-minutes: 120
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
server-id: arenadata
server-username: GITHUB_ACTOR
server-password: GITHUB_TOKEN
- name: Restore m2 repository
uses: actions/cache/restore@v4
with:
path: ~/.m2/repository
key: m2-${{ github.sha }}
- name: Run unit tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: >-
mvn ${{ env.MAVEN_ARGS }} test
${{ env.MAVEN_COMMON_FLAGS }}
-Pbuild-with-jdk17
-DnumForkedUT=2
-Dtest='!org.apache.phoenix.pherf.ResourceTest'
-Dsurefire.failIfNoSpecifiedTests=false
-Dsurefire.rerunFailingTestsCount=2
-Dmaven.test.failure.ignore=false
-fae
- name: Upload surefire reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: surefire-reports
path: '**/target/surefire-reports/'
if-no-files-found: ignore