test: Refactor Existing k6 Tests to Measure Accurately
#4950
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-License-Identifier: Apache-2.0 | |
| name: "E2E Test Suites" | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - release/* | |
| pull_request: | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| defaults: | |
| run: | |
| shell: bash | |
| permissions: | |
| contents: read | |
| env: | |
| GRADLE_EXEC: "ionice -c 2 -n 2 nice -n 19 ./gradlew --no-daemon " | |
| jobs: | |
| api-tests: | |
| timeout-minutes: 30 | |
| runs-on: hiero-block-node-linux-medium | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 | |
| with: | |
| egress-policy: audit | |
| - name: Checkout code | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: Expand Shallow Clone for Spotless | |
| run: | | |
| if [ -f .git/shallow ]; then | |
| git fetch --unshallow --no-recurse-submodules | |
| else | |
| echo "Repository is not shallow, no need to unshallow." | |
| fi | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0 | |
| with: | |
| distribution: "temurin" | |
| java-version: "21.0.6" | |
| - name: Run API E2E Tests | |
| id: api-e2e-tests | |
| run: SERVER_PORT=40481 PROMETHEUS_ENDPOINT_ENABLED=false ${GRADLE_EXEC} runAPISuites # run on non-default port to avoid parallel run conflicts | |
| e2e-tests: | |
| timeout-minutes: 30 | |
| runs-on: hiero-block-node-linux-medium | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 | |
| with: | |
| egress-policy: audit | |
| - name: Checkout code | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: Expand Shallow Clone for Spotless | |
| run: | | |
| if [ -f .git/shallow ]; then | |
| git fetch --unshallow --no-recurse-submodules | |
| else | |
| echo "Repository is not shallow, no need to unshallow." | |
| fi | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0 | |
| with: | |
| distribution: "temurin" | |
| java-version: "21.0.6" | |
| - name: Run Acceptance Tests | |
| id: acceptance-tests | |
| run: ${GRADLE_EXEC} runSuites |