Skip to content

Commit

Permalink
workflow updates: test-summary, bump matrix to JDK 20, version updates.
Browse files Browse the repository at this point in the history
 - use the geckodriver of the test runner
 - enable xserver for headful integration testing
 - strip repo credentials after checkout just to be sure
  • Loading branch information
mbien committed Mar 23, 2023
1 parent 4b68db5 commit 0bb29ea
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 25 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,20 @@ jobs:

steps:
- name: Set up JDK 17
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'zulu'

- name: Checkout Project
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
persist-credentials: false
submodules: false

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/codeql-config.yml
Expand All @@ -49,4 +52,4 @@ jobs:
run: mvn -DskipTests=true -V -ntp install

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
44 changes: 23 additions & 21 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@

name: Apache Roller

# junit report action
# https://github.com/marketplace/actions/junit-report-action

on:
push:
branches: [master]
Expand All @@ -30,45 +27,50 @@ 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', '18' ]
java: [ '11', '17', '20' ]

steps:
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v2
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
bash -c "wget -c https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-linux64.tar.gz -O - | tar -xz"
mvn -V -ntp install
mvn -V -ntp -Dwebdriver.gecko.driver=$GECKOWEBDRIVER/geckodriver install
# TODO: needs submodule workaround since apache does not allow third party actions anymore
# - name: Publish JUnit Report
# uses: mikepenz/action-junit-report@v3
# if: always()
# with:
# check_name: JUnit Reports for Linux/JDK ${{ matrix.java }}
# report_paths: 'app/target/surefire-reports/TEST-*.xml'
#
# - name: Publish IT Report
# uses: mikepenz/action-junit-report@v3
# if: always()
# with:
# check_name: IT Reports for Linux/JDK ${{ matrix.java }}
# report_paths: 'it-selenium/target/failsafe-reports/TEST-*.xml'
- 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
Expand Down

0 comments on commit 0bb29ea

Please sign in to comment.