refactor(backfill): Backfill Plugin Major Refactor And Improvements #231
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: "K6 Load Tests" | |
| 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 | |
| K6_ROOT: ./tools-and-tests/k6 | |
| jobs: | |
| k6-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 repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: Extract version | |
| id: extract_version | |
| run: | | |
| VERSION=$(cat version.txt) | |
| echo "VERSION=${VERSION}" >> $GITHUB_ENV | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0 | |
| with: | |
| distribution: "temurin" | |
| java-version: "21.0.6" | |
| - name: Setup Node | |
| uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| node-version: "20.19.4" | |
| - name: Install k6 | |
| run: | | |
| # based on https://grafana.com/docs/k6/latest/set-up/install-k6/#debianubuntu | |
| sudo gpg -k | |
| sudo gpg --no-default-keyring --keyring /usr/share/keyrings/k6-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C5AD17C747E3415A3642D57D77C6C491D6AC1D69 | |
| echo "deb [signed-by=/usr/share/keyrings/k6-archive-keyring.gpg] https://dl.k6.io/deb stable main" | sudo tee /etc/apt/sources.list.d/k6.list | |
| sudo apt-get update | |
| sudo apt-get install k6 | |
| - name: Run k6 tests | |
| run: | | |
| pushd ${K6_ROOT} || exit 1 | |
| trap "popd" EXIT | |
| npm run test | |
| - name: Stop Containers | |
| if: ${{ always() }} | |
| run: ${GRADLE_EXEC} stopDockerContainer |