Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 30 additions & 30 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: TestBench Validation

on:
pull_request_target:
pull_request:
branches:
- main
types: [opened, synchronize, reopened, edited]
Expand All @@ -15,6 +15,7 @@ concurrency:
cancel-in-progress: true

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
HEAD_REF: ${{ github.head_ref }}
REF_NAME: ${{ github.ref_name }}
BASE_REF: ${{ github.event.pull_request.base.ref }}
Expand All @@ -23,29 +24,25 @@ env:
JAVA_VERSION: 21

jobs:
check-permissions:
uses: ./.github/workflows/check-permissions.yml

format-check:
name: Format Check
needs: check-permissions
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
ref: ${{ env.HEAD_SHA }}

- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: "temurin"

- name: Cache Maven dependencies
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
Expand All @@ -63,23 +60,23 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
ref: ${{ env.HEAD_SHA }}

- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: "temurin"

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: "20"

- name: Cache Maven dependencies
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.run_id }}
Expand All @@ -98,23 +95,24 @@ jobs:
unit-tests:
name: Unit Tests
needs: build
if: ${{ !github.event.pull_request.head.repo.fork }}
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
ref: ${{ env.HEAD_SHA }}

- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: "temurin"

- name: Restore Maven cache
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.run_id }}
Expand All @@ -131,7 +129,7 @@ jobs:

- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: unit-test-results
path: |
Expand All @@ -141,6 +139,7 @@ jobs:
integration-tests:
name: Integration Tests (${{ matrix.name }})
needs: build
if: ${{ !github.event.pull_request.head.repo.fork }}
runs-on: ubuntu-latest
timeout-minutes: 45
concurrency:
Expand All @@ -159,24 +158,24 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
ref: ${{ env.HEAD_SHA }}
fetch-depth: 0

- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: "temurin"

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: "20"

- name: Restore Maven cache
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.run_id }}
Expand Down Expand Up @@ -254,7 +253,7 @@ jobs:

- name: Upload error screenshots
if: failure()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: error-screenshots-${{ matrix.name }}
path: |
Expand All @@ -263,7 +262,7 @@ jobs:

- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: integration-test-results-${{ matrix.name }}
path: |
Expand All @@ -273,28 +272,29 @@ jobs:
loadtest-converter-tests:
name: Load Test Converter Plugin ITs
needs: build
if: ${{ !github.event.pull_request.head.repo.fork }}
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
ref: ${{ env.HEAD_SHA }}

- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: "temurin"

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: "20"

- name: Restore Maven cache
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.run_id }}
Expand All @@ -315,7 +315,7 @@ jobs:

- name: Upload invoker logs
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: loadtest-converter-invoker-logs
path: |
Expand All @@ -330,20 +330,20 @@ jobs:
issues: read
checks: write
pull-requests: write
if: always()
if: ${{ always() && !github.event.pull_request.head.repo.fork }}
needs: [format-check, build, unit-tests, integration-tests, loadtest-converter-tests]
runs-on: ubuntu-latest

steps:
- name: Merge test result artifacts
uses: actions/upload-artifact/merge@v4
uses: actions/upload-artifact/merge@v5
with:
name: test-results
pattern: '{unit-test-results,integration-test-results-*}'
delete-merged: true

- name: Download merged test results
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: test-results

Expand Down
Loading