From 7782f924bde3fc0634e81163850408f5bb68000c Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 22 Sep 2025 13:19:08 +0300 Subject: [PATCH 01/22] chore: Add GitHub Actions workflow for PR validation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaces TeamCity PR validation build with GitHub Actions workflow. Includes Maven build, test execution with Sauce Labs integration, and artifact collection for test failures. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/validation.yml | 133 +++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 .github/workflows/validation.yml diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml new file mode 100644 index 000000000..b8fb295ed --- /dev/null +++ b/.github/workflows/validation.yml @@ -0,0 +1,133 @@ +name: TestBench Validation + +on: + push: + branches: + - main + - master + pull_request: + types: [opened, synchronize, reopened] + workflow_dispatch: + +env: + JAVA_VERSION: 17 + +jobs: + build-and-test: + name: Build and Test + runs-on: ubuntu-latest + timeout-minutes: 45 + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up JDK ${{ env.JAVA_VERSION }} + uses: actions/setup-java@v4 + with: + java-version: ${{ env.JAVA_VERSION }} + distribution: "temurin" + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: "20" + + - name: Cache Maven dependencies + uses: actions/cache@v4 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + - name: Clean Maven cache (if needed) + if: github.event_name == 'workflow_dispatch' + run: | + echo "---> Clean maven cache" + rm -rf ~/.m2/repository ~/.npm* ~/.pnpm* + + - name: Set up Sauce Labs tunnel + if: env.SAUCE_USERNAME != '' && env.SAUCE_ACCESS_KEY != '' + env: + SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} + SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} + run: | + echo "Setting up Sauce Connect tunnel..." + SAUCE_TUNNEL_ID="${{ github.run_id }}-${{ github.run_number }}" + echo "SAUCE_TUNNEL_ID=${SAUCE_TUNNEL_ID}" >> $GITHUB_ENV + + # Download and start Sauce Connect + SC_VERSION=4.9.2 + wget -q https://saucelabs.com/downloads/sc-${SC_VERSION}-linux.tar.gz -O - | tar -xzf - + ./sc-${SC_VERSION}-linux/bin/sc \ + -u $SAUCE_USERNAME \ + -k $SAUCE_ACCESS_KEY \ + -i ${SAUCE_TUNNEL_ID} \ + --no-remove-colliding-tunnels & + + # Wait for tunnel to be ready + sleep 30 + + - name: Build with Maven + run: | + mvn clean install -DskipTests -B + + - name: Run Tests and Generate Javadoc + env: + SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} + SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} + run: | + mvn javadoc:javadoc verify \ + -P verify-only-phantom,validation \ + -Dvaadin.testbench.developer.license=${{ secrets.TESTBENCH_LICENSE }} \ + -Dtestbench.javadocs \ + -Dsystem.com.vaadin.testbench.Parameters.testsInParallel=5 \ + -Dsystem.com.vaadin.testbench.Parameters.maxAttempts=2 \ + -Dcom.vaadin.testbench.Parameters.hubHostname=localhost \ + -Dsauce.tunnelId=${SAUCE_TUNNEL_ID:-} \ + -Dfailsafe.forkCount=5 \ + -Dsystem.sauce.user=${SAUCE_USERNAME:-} \ + -Dsystem.sauce.sauceAccessKey=${SAUCE_ACCESS_KEY:-} \ + -B + + - name: Stop Sauce Labs tunnel + if: always() && env.SAUCE_USERNAME != '' && env.SAUCE_ACCESS_KEY != '' + run: | + echo "Stopping Sauce Connect tunnel..." + pkill -f sc || true + + - name: Upload test artifacts on failure + if: failure() + uses: actions/upload-artifact@v4 + with: + name: test-artifacts-${{ github.run_id }} + path: | + vaadin-testbench-integration-tests/error-screenshots/ + testbench-integration-tests/error-screenshots/ + vaadin-testbench-integration-tests-junit5/error-screenshots/ + **/target/surefire-reports/ + **/target/failsafe-reports/ + retention-days: 7 + + - name: Upload test results + if: always() + uses: actions/upload-artifact@v4 + with: + name: test-results-${{ github.run_id }} + path: | + **/target/surefire-reports/*.xml + **/target/failsafe-reports/*.xml + retention-days: 7 + + - name: Publish test results + if: always() + uses: EnricoMi/publish-unit-test-result-action@v2 + with: + files: | + **/target/surefire-reports/*.xml + **/target/failsafe-reports/*.xml + check_name: Test Results + comment_mode: failures From 8fd17d68a94c389039b11cdb8138cc316ac92281 Mon Sep 17 00:00:00 2001 From: Artur Date: Mon, 22 Sep 2025 22:40:33 +0300 Subject: [PATCH 02/22] Update validation.yml --- .github/workflows/validation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index b8fb295ed..2a76d61a6 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -82,7 +82,7 @@ jobs: run: | mvn javadoc:javadoc verify \ -P verify-only-phantom,validation \ - -Dvaadin.testbench.developer.license=${{ secrets.TESTBENCH_LICENSE }} \ + -Dvaadin.testbench.developer.license=${{ secrets.TB_LICENSE }} \ -Dtestbench.javadocs \ -Dsystem.com.vaadin.testbench.Parameters.testsInParallel=5 \ -Dsystem.com.vaadin.testbench.Parameters.maxAttempts=2 \ From 5ce460e92c2b151daf6dafb4a5c0aa5b8a006d9d Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 22 Sep 2025 22:59:23 +0300 Subject: [PATCH 03/22] fix: Update Sauce Connect to v5.x and configure PRO_KEY environment variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Upgrade Sauce Connect from 4.9.2 to 5.2.0 - Update command-line arguments to use new v5 syntax (--username, --access-key, --tunnel-name) - Configure TB_LICENSE secret as PRO_KEY environment variable - Remove inline license parameter from Maven command 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/validation.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index 2a76d61a6..596cb781e 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -59,13 +59,13 @@ jobs: SAUCE_TUNNEL_ID="${{ github.run_id }}-${{ github.run_number }}" echo "SAUCE_TUNNEL_ID=${SAUCE_TUNNEL_ID}" >> $GITHUB_ENV - # Download and start Sauce Connect - SC_VERSION=4.9.2 - wget -q https://saucelabs.com/downloads/sc-${SC_VERSION}-linux.tar.gz -O - | tar -xzf - - ./sc-${SC_VERSION}-linux/bin/sc \ - -u $SAUCE_USERNAME \ - -k $SAUCE_ACCESS_KEY \ - -i ${SAUCE_TUNNEL_ID} \ + # Download and start Sauce Connect 5.x + SC_VERSION=5.2.0 + wget -q https://saucelabs.com/downloads/sauce-connect/sauce-connect-${SC_VERSION}_linux.x86_64.tar.gz -O - | tar -xzf - + ./sauce-connect-${SC_VERSION}/sc \ + --username $SAUCE_USERNAME \ + --access-key $SAUCE_ACCESS_KEY \ + --tunnel-name ${SAUCE_TUNNEL_ID} \ --no-remove-colliding-tunnels & # Wait for tunnel to be ready @@ -79,10 +79,10 @@ jobs: env: SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} + PRO_KEY: ${{ secrets.TB_LICENSE }} run: | mvn javadoc:javadoc verify \ -P verify-only-phantom,validation \ - -Dvaadin.testbench.developer.license=${{ secrets.TB_LICENSE }} \ -Dtestbench.javadocs \ -Dsystem.com.vaadin.testbench.Parameters.testsInParallel=5 \ -Dsystem.com.vaadin.testbench.Parameters.maxAttempts=2 \ From 2fe68888e64ce2835457650d770ed2acfacba3b2 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 22 Sep 2025 23:22:28 +0300 Subject: [PATCH 04/22] fix: Correct Sauce Connect 5.x download URL format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix URL to include version in path: /sauce-connect/{VERSION}/sauce-connect-{VERSION}_linux.x86_64.tar.gz - Update to latest version 5.2.3 - Fix extracted directory path (./sauce-connect/sc instead of ./sauce-connect-{VERSION}/sc) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/validation.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index 596cb781e..21a147e69 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -60,9 +60,9 @@ jobs: echo "SAUCE_TUNNEL_ID=${SAUCE_TUNNEL_ID}" >> $GITHUB_ENV # Download and start Sauce Connect 5.x - SC_VERSION=5.2.0 - wget -q https://saucelabs.com/downloads/sauce-connect/sauce-connect-${SC_VERSION}_linux.x86_64.tar.gz -O - | tar -xzf - - ./sauce-connect-${SC_VERSION}/sc \ + SC_VERSION=5.2.3 + wget -q https://saucelabs.com/downloads/sauce-connect/${SC_VERSION}/sauce-connect-${SC_VERSION}_linux.x86_64.tar.gz -O - | tar -xzf - + ./sauce-connect/sc \ --username $SAUCE_USERNAME \ --access-key $SAUCE_ACCESS_KEY \ --tunnel-name ${SAUCE_TUNNEL_ID} \ From 4eea99440f00ca29739a07ad352c03b34c9329b2 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 22 Sep 2025 23:26:55 +0300 Subject: [PATCH 05/22] refactor: Merge format-check workflow into validation workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add format-check job to validation workflow to run in parallel with build-and-test - Remove separate format-check.yml workflow file - Format validation now runs as part of the main PR validation pipeline 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/format-check.yml | 23 ----------------------- .github/workflows/validation.yml | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 23 deletions(-) delete mode 100644 .github/workflows/format-check.yml diff --git a/.github/workflows/format-check.yml b/.github/workflows/format-check.yml deleted file mode 100644 index 4c6efb3a2..000000000 --- a/.github/workflows/format-check.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Maven Format Validation - -on: - pull_request: - push: - branches: [ main ] - -jobs: - format-check: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - distribution: temurin - java-version: 17 - - - name: Run formatter:validate - run: mvn formatter:validate --batch-mode --no-transfer-progress diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index 21a147e69..da60e9790 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -13,6 +13,24 @@ env: JAVA_VERSION: 17 jobs: + format-check: + name: Format Check + runs-on: ubuntu-latest + timeout-minutes: 10 + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up JDK ${{ env.JAVA_VERSION }} + uses: actions/setup-java@v4 + with: + java-version: ${{ env.JAVA_VERSION }} + distribution: "temurin" + + - name: Run formatter validation + run: mvn formatter:validate --batch-mode --no-transfer-progress + build-and-test: name: Build and Test runs-on: ubuntu-latest From f0644206bc789d058f67a7985ac27109824c49dc Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 22 Sep 2025 23:27:50 +0300 Subject: [PATCH 06/22] feat: Add Maven cache to format-check job MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add Maven dependency caching to format-check job - Uses same cache key as build-and-test job for artifact sharing - Prevents redundant downloads between parallel jobs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/validation.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index da60e9790..d4d7909de 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -28,6 +28,14 @@ jobs: java-version: ${{ env.JAVA_VERSION }} distribution: "temurin" + - name: Cache Maven dependencies + uses: actions/cache@v4 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Run formatter validation run: mvn formatter:validate --batch-mode --no-transfer-progress From 944296ca7a427b7b9ada1fd4314d32b32ac3d14c Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 22 Sep 2025 23:29:22 +0300 Subject: [PATCH 07/22] fix: Run format-check and build-and-test jobs sequentially MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add 'needs: format-check' to build-and-test job - Ensures proper cache sharing between jobs - Prevents cache conflicts and race conditions - Format check must pass before build and tests run 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/validation.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index d4d7909de..c8f81f9a5 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -41,6 +41,7 @@ jobs: build-and-test: name: Build and Test + needs: format-check runs-on: ubuntu-latest timeout-minutes: 45 From 36479905597059f130901afac701cdd09adb6026 Mon Sep 17 00:00:00 2001 From: Zhe Sun <31067185+ZheSun88@users.noreply.github.com> Date: Tue, 23 Sep 2025 11:45:13 +0300 Subject: [PATCH 08/22] chore: set TB License --- .github/workflows/validation.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index c8f81f9a5..ec5758c29 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -98,6 +98,12 @@ jobs: # Wait for tunnel to be ready sleep 30 + - name: Set TB License + run: | + TB_LICENSE=${{secrets.TB_LICENSE}} + mkdir -p ~/.vaadin/ + echo '{"username":"'`echo $TB_LICENSE | cut -d / -f1`'","proKey":"'`echo $TB_LICENSE | cut -d / -f2`'"}' > ~/.vaadin/proKey + - name: Build with Maven run: | mvn clean install -DskipTests -B @@ -106,7 +112,6 @@ jobs: env: SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} - PRO_KEY: ${{ secrets.TB_LICENSE }} run: | mvn javadoc:javadoc verify \ -P verify-only-phantom,validation \ From 968565b4c036e10419089e887ffab200dc7589cb Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Sun, 28 Sep 2025 11:08:20 +0300 Subject: [PATCH 09/22] fix: Correct Sauce Connect binary path for version 5.x MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The extracted directory structure for Sauce Connect 5.x is sc-${VERSION}-linux/bin/sc, not sauce-connect/sc 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/validation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index ec5758c29..6c7112779 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -89,7 +89,7 @@ jobs: # Download and start Sauce Connect 5.x SC_VERSION=5.2.3 wget -q https://saucelabs.com/downloads/sauce-connect/${SC_VERSION}/sauce-connect-${SC_VERSION}_linux.x86_64.tar.gz -O - | tar -xzf - - ./sauce-connect/sc \ + ./sc-${SC_VERSION}-linux/bin/sc \ --username $SAUCE_USERNAME \ --access-key $SAUCE_ACCESS_KEY \ --tunnel-name ${SAUCE_TUNNEL_ID} \ From 884c1dcfb92c1b501b388142330e79391561c848 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Sun, 28 Sep 2025 11:24:41 +0300 Subject: [PATCH 10/22] fix: Improve Sauce Connect setup and monitoring MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Use hardcoded version in path (5.2.3) instead of variable expansion - Wait for specific "Sauce Connect is up" message instead of sleeping - Fail fast if SC process dies or doesn't start within 2 minutes - Save PID for proper cleanup - Include SC logs in failure artifacts for debugging 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/validation.yml | 48 ++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 6 deletions(-) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index 6c7112779..26bea7b87 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -89,14 +89,38 @@ jobs: # Download and start Sauce Connect 5.x SC_VERSION=5.2.3 wget -q https://saucelabs.com/downloads/sauce-connect/${SC_VERSION}/sauce-connect-${SC_VERSION}_linux.x86_64.tar.gz -O - | tar -xzf - - ./sc-${SC_VERSION}-linux/bin/sc \ + ./sc-5.2.3-linux/bin/sc \ --username $SAUCE_USERNAME \ --access-key $SAUCE_ACCESS_KEY \ --tunnel-name ${SAUCE_TUNNEL_ID} \ - --no-remove-colliding-tunnels & - - # Wait for tunnel to be ready - sleep 30 + --no-remove-colliding-tunnels > sc.log 2>&1 & + + # Save PID for cleanup + SC_PID=$! + echo "SC_PID=${SC_PID}" >> $GITHUB_ENV + + # Wait for tunnel to be ready (look for the ready message) + echo "Waiting for Sauce Connect to be ready..." + for i in {1..60}; do + if grep -q "Sauce Connect is up, you may start your tests" sc.log 2>/dev/null; then + echo "Sauce Connect tunnel is ready!" + break + fi + if ! kill -0 $SC_PID 2>/dev/null; then + echo "Sauce Connect process died unexpectedly" + cat sc.log + exit 1 + fi + echo "Waiting for Sauce Connect... ($i/60)" + sleep 2 + done + + # Check if tunnel is actually ready + if ! grep -q "Sauce Connect is up, you may start your tests" sc.log; then + echo "Sauce Connect failed to start within 2 minutes" + cat sc.log + exit 1 + fi - name: Set TB License run: | @@ -129,7 +153,18 @@ jobs: if: always() && env.SAUCE_USERNAME != '' && env.SAUCE_ACCESS_KEY != '' run: | echo "Stopping Sauce Connect tunnel..." - pkill -f sc || true + if [ -n "${SC_PID}" ]; then + kill ${SC_PID} || true + wait ${SC_PID} 2>/dev/null || true + fi + # Also try pkill as fallback + pkill -f "sc.*--tunnel-name" || true + + # Show final logs for debugging + if [ -f sc.log ]; then + echo "=== Sauce Connect final logs ===" + tail -20 sc.log + fi - name: Upload test artifacts on failure if: failure() @@ -142,6 +177,7 @@ jobs: vaadin-testbench-integration-tests-junit5/error-screenshots/ **/target/surefire-reports/ **/target/failsafe-reports/ + sc.log retention-days: 7 - name: Upload test results From 243275b1a9781f6e43255d772197f18285f946fc Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Sun, 28 Sep 2025 11:24:41 +0300 Subject: [PATCH 11/22] Fix version --- .github/workflows/validation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index 26bea7b87..e450e962d 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -88,7 +88,7 @@ jobs: # Download and start Sauce Connect 5.x SC_VERSION=5.2.3 - wget -q https://saucelabs.com/downloads/sauce-connect/${SC_VERSION}/sauce-connect-${SC_VERSION}_linux.x86_64.tar.gz -O - | tar -xzf - + wget -q https://saucelabs.com/downloads/sauce-connect/5.2.3/sauce-connect-5.2.3_linux.x86_64.tar.gz -O - | tar -xzf - ./sc-5.2.3-linux/bin/sc \ --username $SAUCE_USERNAME \ --access-key $SAUCE_ACCESS_KEY \ From 351054d6d7ce4bb1744f61af59a8f876822fee47 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Sun, 28 Sep 2025 22:14:57 +0300 Subject: [PATCH 12/22] refactor: Use official sauce-connect-action v3 instead of manual setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace manual Sauce Connect download and setup with saucelabs/sauce-connect-action@v3 - Remove manual cleanup step as the action handles it automatically - Simplify tunnel ID management - Remove sc.log from artifacts as it's not generated with the action 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/validation.yml | 74 +++++--------------------------- 1 file changed, 10 insertions(+), 64 deletions(-) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index e450e962d..8ae9a406a 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -78,49 +78,12 @@ jobs: - name: Set up Sauce Labs tunnel if: env.SAUCE_USERNAME != '' && env.SAUCE_ACCESS_KEY != '' - env: - SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} - SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} - run: | - echo "Setting up Sauce Connect tunnel..." - SAUCE_TUNNEL_ID="${{ github.run_id }}-${{ github.run_number }}" - echo "SAUCE_TUNNEL_ID=${SAUCE_TUNNEL_ID}" >> $GITHUB_ENV - - # Download and start Sauce Connect 5.x - SC_VERSION=5.2.3 - wget -q https://saucelabs.com/downloads/sauce-connect/5.2.3/sauce-connect-5.2.3_linux.x86_64.tar.gz -O - | tar -xzf - - ./sc-5.2.3-linux/bin/sc \ - --username $SAUCE_USERNAME \ - --access-key $SAUCE_ACCESS_KEY \ - --tunnel-name ${SAUCE_TUNNEL_ID} \ - --no-remove-colliding-tunnels > sc.log 2>&1 & - - # Save PID for cleanup - SC_PID=$! - echo "SC_PID=${SC_PID}" >> $GITHUB_ENV - - # Wait for tunnel to be ready (look for the ready message) - echo "Waiting for Sauce Connect to be ready..." - for i in {1..60}; do - if grep -q "Sauce Connect is up, you may start your tests" sc.log 2>/dev/null; then - echo "Sauce Connect tunnel is ready!" - break - fi - if ! kill -0 $SC_PID 2>/dev/null; then - echo "Sauce Connect process died unexpectedly" - cat sc.log - exit 1 - fi - echo "Waiting for Sauce Connect... ($i/60)" - sleep 2 - done - - # Check if tunnel is actually ready - if ! grep -q "Sauce Connect is up, you may start your tests" sc.log; then - echo "Sauce Connect failed to start within 2 minutes" - cat sc.log - exit 1 - fi + uses: saucelabs/sauce-connect-action@v3 + with: + username: ${{ secrets.SAUCE_USERNAME }} + accessKey: ${{ secrets.SAUCE_ACCESS_KEY }} + tunnelName: ${{ github.run_id }}-${{ github.run_number }} + retryTimeout: 300 - name: Set TB License run: | @@ -136,6 +99,7 @@ jobs: env: SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} + SAUCE_TUNNEL_ID: ${{ github.run_id }}-${{ github.run_number }} run: | mvn javadoc:javadoc verify \ -P verify-only-phantom,validation \ @@ -143,29 +107,12 @@ jobs: -Dsystem.com.vaadin.testbench.Parameters.testsInParallel=5 \ -Dsystem.com.vaadin.testbench.Parameters.maxAttempts=2 \ -Dcom.vaadin.testbench.Parameters.hubHostname=localhost \ - -Dsauce.tunnelId=${SAUCE_TUNNEL_ID:-} \ + -Dsauce.tunnelId=${SAUCE_TUNNEL_ID} \ -Dfailsafe.forkCount=5 \ - -Dsystem.sauce.user=${SAUCE_USERNAME:-} \ - -Dsystem.sauce.sauceAccessKey=${SAUCE_ACCESS_KEY:-} \ + -Dsystem.sauce.user=${SAUCE_USERNAME} \ + -Dsystem.sauce.sauceAccessKey=${SAUCE_ACCESS_KEY} \ -B - - name: Stop Sauce Labs tunnel - if: always() && env.SAUCE_USERNAME != '' && env.SAUCE_ACCESS_KEY != '' - run: | - echo "Stopping Sauce Connect tunnel..." - if [ -n "${SC_PID}" ]; then - kill ${SC_PID} || true - wait ${SC_PID} 2>/dev/null || true - fi - # Also try pkill as fallback - pkill -f "sc.*--tunnel-name" || true - - # Show final logs for debugging - if [ -f sc.log ]; then - echo "=== Sauce Connect final logs ===" - tail -20 sc.log - fi - - name: Upload test artifacts on failure if: failure() uses: actions/upload-artifact@v4 @@ -177,7 +124,6 @@ jobs: vaadin-testbench-integration-tests-junit5/error-screenshots/ **/target/surefire-reports/ **/target/failsafe-reports/ - sc.log retention-days: 7 - name: Upload test results From b7ceb44803e570d029d25767294eba527a855b4a Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Sun, 28 Sep 2025 22:18:46 +0300 Subject: [PATCH 13/22] use existing version, see https://github.com/saucelabs/sauce-connect-action/issues/101 --- .github/workflows/validation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index 8ae9a406a..5486b3061 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -78,7 +78,7 @@ jobs: - name: Set up Sauce Labs tunnel if: env.SAUCE_USERNAME != '' && env.SAUCE_ACCESS_KEY != '' - uses: saucelabs/sauce-connect-action@v3 + uses: saucelabs/sauce-connect-action@v3.0.0 with: username: ${{ secrets.SAUCE_USERNAME }} accessKey: ${{ secrets.SAUCE_ACCESS_KEY }} From bd9f42d2f4059054e0f6bfb4eb04d210a99df1aa Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Sun, 28 Sep 2025 22:20:54 +0300 Subject: [PATCH 14/22] Secrets --- .github/workflows/validation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index 5486b3061..af03e0ccc 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -77,7 +77,7 @@ jobs: rm -rf ~/.m2/repository ~/.npm* ~/.pnpm* - name: Set up Sauce Labs tunnel - if: env.SAUCE_USERNAME != '' && env.SAUCE_ACCESS_KEY != '' + if: secrets.SAUCE_USERNAME != '' && secrets.SAUCE_ACCESS_KEY != '' uses: saucelabs/sauce-connect-action@v3.0.0 with: username: ${{ secrets.SAUCE_USERNAME }} From 25ba2412b789317d242e39fd0220c368cc316877 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Sun, 28 Sep 2025 22:23:01 +0300 Subject: [PATCH 15/22] . --- .github/workflows/validation.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index af03e0ccc..3e9ed4960 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -77,7 +77,6 @@ jobs: rm -rf ~/.m2/repository ~/.npm* ~/.pnpm* - name: Set up Sauce Labs tunnel - if: secrets.SAUCE_USERNAME != '' && secrets.SAUCE_ACCESS_KEY != '' uses: saucelabs/sauce-connect-action@v3.0.0 with: username: ${{ secrets.SAUCE_USERNAME }} From d179e571d2b0380771370d0903aa8373e2eb901c Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Sun, 28 Sep 2025 22:33:37 +0300 Subject: [PATCH 16/22] region --- .github/workflows/validation.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index 3e9ed4960..7dc7e9f9a 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -82,6 +82,7 @@ jobs: username: ${{ secrets.SAUCE_USERNAME }} accessKey: ${{ secrets.SAUCE_ACCESS_KEY }} tunnelName: ${{ github.run_id }}-${{ github.run_number }} + region: us-west-1 retryTimeout: 300 - name: Set TB License From 67c2c54909b6de5cdc115bda71bd6ca9961667ca Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 29 Sep 2025 09:45:00 +0300 Subject: [PATCH 17/22] fix: Separate error screenshots into their own artifact MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Split test artifacts into two separate uploads: - error-screenshots: Contains only screenshot files from test failures - test-reports: Contains surefire and failsafe reports This makes it easier to find and download just the screenshots when debugging failures. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/validation.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index 7dc7e9f9a..53c8e45ca 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -113,15 +113,21 @@ jobs: -Dsystem.sauce.sauceAccessKey=${SAUCE_ACCESS_KEY} \ -B - - name: Upload test artifacts on failure + - name: Upload error screenshots if: failure() uses: actions/upload-artifact@v4 with: - name: test-artifacts-${{ github.run_id }} + name: error-screenshots-${{ github.run_id }} + path: | + **/error-screenshots/** + retention-days: 7 + + - name: Upload test reports on failure + if: failure() + uses: actions/upload-artifact@v4 + with: + name: test-reports-${{ github.run_id }} path: | - vaadin-testbench-integration-tests/error-screenshots/ - testbench-integration-tests/error-screenshots/ - vaadin-testbench-integration-tests-junit5/error-screenshots/ **/target/surefire-reports/ **/target/failsafe-reports/ retention-days: 7 From 98085a56f5feb50c96596347de6d9563a6b70bb4 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 29 Sep 2025 09:46:56 +0300 Subject: [PATCH 18/22] fix: Enable localhost proxying for Sauce Connect tunnel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add --proxy-localhost flag to allow Sauce Labs to connect to localhost addresses, which is required for the test setup. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/validation.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index 53c8e45ca..eb6aedc62 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -84,6 +84,7 @@ jobs: tunnelName: ${{ github.run_id }}-${{ github.run_number }} region: us-west-1 retryTimeout: 300 + scArgs: --proxy-localhost - name: Set TB License run: | From 13c1d1f2f669c43cffabf4f58996273e604a8997 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 29 Sep 2025 09:48:36 +0300 Subject: [PATCH 19/22] fix: Use correct proxyLocalhost parameter for Sauce Connect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace scArgs with the proper proxyLocalhost: allow parameter to enable localhost proxying in Sauce Connect tunnel. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/validation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index eb6aedc62..162e717e5 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -84,7 +84,7 @@ jobs: tunnelName: ${{ github.run_id }}-${{ github.run_number }} region: us-west-1 retryTimeout: 300 - scArgs: --proxy-localhost + proxyLocalhost: allow - name: Set TB License run: | From 0af2f9e52a8b8976e0ca28cf60c50affc069dadc Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 29 Sep 2025 09:48:59 +0300 Subject: [PATCH 20/22] no phantomjs --- .github/workflows/validation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index 162e717e5..f2ce8da99 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -103,7 +103,7 @@ jobs: SAUCE_TUNNEL_ID: ${{ github.run_id }}-${{ github.run_number }} run: | mvn javadoc:javadoc verify \ - -P verify-only-phantom,validation \ + -P validation \ -Dtestbench.javadocs \ -Dsystem.com.vaadin.testbench.Parameters.testsInParallel=5 \ -Dsystem.com.vaadin.testbench.Parameters.maxAttempts=2 \ From 1232207ced1361a36939d0881bb93d415f8846b5 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 29 Sep 2025 10:28:11 +0300 Subject: [PATCH 21/22] fix: Exclude failsafe-summary.xml from test result parsing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change file patterns to only include TEST-*.xml files, excluding failsafe-summary.xml which is not in JUnit XML format and causes the test result publisher to fail. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/validation.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index f2ce8da99..e5f9fb518 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -139,8 +139,8 @@ jobs: with: name: test-results-${{ github.run_id }} path: | - **/target/surefire-reports/*.xml - **/target/failsafe-reports/*.xml + **/target/surefire-reports/TEST-*.xml + **/target/failsafe-reports/TEST-*.xml retention-days: 7 - name: Publish test results @@ -148,7 +148,7 @@ jobs: uses: EnricoMi/publish-unit-test-result-action@v2 with: files: | - **/target/surefire-reports/*.xml - **/target/failsafe-reports/*.xml + **/target/surefire-reports/TEST-*.xml + **/target/failsafe-reports/TEST-*.xml check_name: Test Results comment_mode: failures From 3208e7e2db628a80370df227d71c337c5d2e84d6 Mon Sep 17 00:00:00 2001 From: Zhe Sun <31067185+ZheSun88@users.noreply.github.com> Date: Tue, 30 Sep 2025 10:01:23 +0300 Subject: [PATCH 22/22] upgrade java version to 21 and remove master branch --- .github/workflows/validation.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index e5f9fb518..136f798b5 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -4,13 +4,12 @@ on: push: branches: - main - - master pull_request: types: [opened, synchronize, reopened] workflow_dispatch: env: - JAVA_VERSION: 17 + JAVA_VERSION: 21 jobs: format-check: