Skip to content

Commit

Permalink
Merge branch 'refactor/simplify-project-structure' into test/validati…
Browse files Browse the repository at this point in the history
…on-workflow
  • Loading branch information
mcollovati authored Dec 26, 2023
2 parents 9a835d6 + e77cab6 commit e90f168
Showing 1 changed file with 60 additions and 5 deletions.
65 changes: 60 additions & 5 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
set -x -e -o pipefail
VERTX_VAADIN_VERSION=$(mvn -N -ntp -q help:evaluate -Dexpression=project.version -DforceStdout)
echo "VERTX_VAADIN_VERSION=${VERTX_VAADIN_VERSION}" >> "$GITHUB_ENV"
mvn -V -e -B -ntp -DskipTests -Dmaven.javadoc.skip=false install
mvn -V -e -B -ntp -DskipTests -Dmaven.javadoc.skip=false install -Pflow-ui-tests
- name: Save workspace
run: |
tar cf workspace.tar -C ~/ $(cd ~/ && echo .m2/repository/com/github/mcollovati/vertx/*/$VERTX_VAADIN_VERSION)
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
if: ${{ github.run_attempt > 1 }}
run: |
set -x -e -o pipefail
mvn -V -e -B -ntp -DskipTests -Dmaven.javadoc.skip=false install
mvn -V -e -B -ntp -DskipTests -Dmaven.javadoc.skip=false install -Pflow-ui-tests
- name: Test
env:
VAADIN_OFFLINE_KEY: ${{ secrets.VAADIN_OFFLINE_KEY }}
Expand All @@ -131,7 +131,7 @@ jobs:
with:
name: tests-output
path: tests-report-*.tgz
ui-tests:
it-tests-1:
name: UI tests
needs: [build]
if: ${{ needs.changes.outputs.validation-required == 'true' }}
Expand Down Expand Up @@ -171,13 +171,68 @@ jobs:
if: ${{ github.run_attempt > 1 }}
run: |
set -x -e -o pipefail
mvn -V -e -B -ntp -DskipTests -Dmaven.javadoc.skip=false install
mvn -V -e -B -ntp -DskipTests -Dmaven.javadoc.skip=false install -Pflow-ui-tests
- name: UI Test
env:
VAADIN_OFFLINE_KEY: ${{ secrets.VAADIN_OFFLINE_KEY }}
run: |
set -x -e -o pipefail
cd vertx-vaadin-tests
mvn -V -e -B -ntp verify -Dmaven.javadoc.skip=false -pl=-test-frontend -DtrimStackTrace=false \
-Dwebdriver.chrome.driver=$(which chromedriver) \
-Duitest.chrome-version=$CHROME_VERSION \
-Dtest.vertx.jvmArgs="-Dorg.slf4j.simpleLogger.logFile=target/verticle.log -Dvaadin.require.home.node=true -Xmx2048M -Dvertx.logger-delegate-factory-class-name=io.vertx.core.logging.SLF4JLogDelegateFactory"
- name: Package test output files
if: ${{ failure() || success() }}
run: find . -name surefire-reports -o -name failsafe-reports -o -name verticle.log | tar -czf tests-report-ui.tgz -T -
- uses: actions/upload-artifact@v3
if: ${{ failure() || success() }}
with:
name: tests-output
path: tests-report-*.tgz
it-tests-2:
name: UI tests
needs: [build]
if: ${{ needs.changes.outputs.validation-required == 'true' }}
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: 'temurin'
cache: maven
- uses: browser-actions/setup-chrome@latest
id: setup-chrome
if: ${{ !vars.QH_DISABLE_CHROME_INSTALL }}
with:
chrome-version: stable
- uses: actions/download-artifact@v3
if: ${{ github.run_attempt == 1 }}
with:
name: saved-workspace
- name: Restore Workspace
if: ${{ github.run_attempt == 1 }}
run: |
set -x
tar xf workspace.tar
tar cf - .m2 | (cd ~ && tar xf -)
- name: Build
if: ${{ github.run_attempt > 1 }}
run: |
set -x -e -o pipefail
mvn -V -e -B -ntp -DskipTests -Dmaven.javadoc.skip=false install -Pflow-ui-tests
- name: UI Test
env:
VAADIN_OFFLINE_KEY: ${{ secrets.VAADIN_OFFLINE_KEY }}
run: |
set -x -e -o pipefail
cd vertx-vaadin-tests/test-frontend
mvn -V -e -B -ntp verify -Dmaven.javadoc.skip=false -DtrimStackTrace=false \
-Dwebdriver.chrome.driver=$(which chromedriver) \
-Duitest.chrome-version=$CHROME_VERSION \
Expand All @@ -196,7 +251,7 @@ jobs:
checks: write
pull-requests: write
if: ${{ always() }}
needs: [changes, tests, ui-tests]
needs: [changes, tests, it-tests-1, it-tests-2]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down

0 comments on commit e90f168

Please sign in to comment.