blob: 64e7dcaa5c14cdc6689264555b3db8e58bd41663 [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: Apache Roller
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build-test:
name: Build+Test on Linux/JDK ${{ matrix.java }}
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
java: [ '11', '17', '20' ]
steps:
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
- name: Setup Xvfb
run: |
echo "DISPLAY=:99.0" >> $GITHUB_ENV
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Checkout Project
uses: actions/checkout@v3
with:
persist-credentials: false
submodules: false
- name: Build Roller and run JUnit Tests
run: mvn -V -ntp install
- name: Run Integration Tests
run: |
cd it-selenium
mvn -V -ntp -Dwebdriver.gecko.driver=$GECKOWEBDRIVER/geckodriver install
- name: Publish JUnit Report
uses: test-summary/action@v2
if: always()
with:
paths: "app/target/surefire-reports/TEST-*.xml"
- name: Publish IT Report
uses: test-summary/action@v2
if: always()
with:
paths: "it-selenium/target/failsafe-reports/TEST-*.xml"
# only on integration and only once in this matrix
- name: Upload Dev Build on Integration
if: ${{ (matrix.java == '11') && (github.event_name == 'push') }}
uses: actions/upload-artifact@v3
with:
name: dev-build
path: ./app/target/roller.war
retention-days: 90
if-no-files-found: error