|
| 1 | +name: 'Run Load Test on Self-Hosted Runners' |
| 2 | +description: 'Run load tests against Kubernetes cluster on self-hosted runners' |
| 3 | + |
| 4 | +inputs: |
| 5 | + avalanchego_image: |
| 6 | + description: 'AvalancheGo image to test' |
| 7 | + required: false |
| 8 | + default: 'avaplatform/avalanchego:latest' |
| 9 | + exclusive_scheduling: |
| 10 | + description: 'Enable exclusive scheduling' |
| 11 | + required: false |
| 12 | + default: "false" |
| 13 | + duration: |
| 14 | + description: "Load test duration" |
| 15 | + required: false |
| 16 | + artifact_prefix: |
| 17 | + description: 'Prefix for artifact names' |
| 18 | + required: false |
| 19 | + default: 'load-test-self-hosted-runners' |
| 20 | + prometheus_username: |
| 21 | + description: 'Prometheus username for monitoring' |
| 22 | + required: true |
| 23 | + prometheus_password: |
| 24 | + description: 'Prometheus password for monitoring' |
| 25 | + required: true |
| 26 | + loki_username: |
| 27 | + description: 'Loki username for logging' |
| 28 | + required: true |
| 29 | + loki_password: |
| 30 | + description: 'Loki password for logging' |
| 31 | + required: true |
| 32 | + |
| 33 | +runs: |
| 34 | + using: composite |
| 35 | + steps: |
| 36 | + - name: Install dependencies |
| 37 | + shell: bash |
| 38 | + # The xz-utils might be present on some containers |
| 39 | + run: | |
| 40 | + if ! command -v xz &> /dev/null; then |
| 41 | + sudo apt-get update |
| 42 | + sudo apt-get install -y xz-utils |
| 43 | + fi |
| 44 | + - name: Checkout code |
| 45 | + uses: actions/checkout@v4 |
| 46 | + with: |
| 47 | + fetch-depth: 0 |
| 48 | + - name: Setup Go for project |
| 49 | + uses: ./.github/actions/setup-go-for-project |
| 50 | + - name: Run exclusive load test |
| 51 | + if: inputs.exclusive_scheduling == 'true' |
| 52 | + uses: ./.github/actions/run-monitored-tmpnet-cmd |
| 53 | + with: |
| 54 | + run: ./scripts/run_task.sh test-load-exclusive -- --kube-image ${{ inputs.avalanchego_image }}${{ inputs.duration && format(' --duration {0}', inputs.duration) || '' }} |
| 55 | + artifact_prefix: ${{ inputs.artifact_prefix }} |
| 56 | + prometheus_username: ${{ inputs.prometheus_username }} |
| 57 | + prometheus_password: ${{ inputs.prometheus_password }} |
| 58 | + loki_username: ${{ inputs.loki_username }} |
| 59 | + loki_password: ${{ inputs.loki_password }} |
| 60 | + - name: Run load test |
| 61 | + if: inputs.exclusive_scheduling != 'true' |
| 62 | + uses: ./.github/actions/run-monitored-tmpnet-cmd |
| 63 | + with: |
| 64 | + run: ./scripts/run_task.sh test-load-kube -- --kube-image ${{ inputs.avalanchego_image }}${{ inputs.duration && format(' --duration {0}', inputs.duration) || '' }} |
| 65 | + artifact_prefix: ${{ inputs.artifact_prefix }} |
| 66 | + prometheus_username: ${{ inputs.prometheus_username }} |
| 67 | + prometheus_password: ${{ inputs.prometheus_password }} |
| 68 | + loki_username: ${{ inputs.loki_username }} |
| 69 | + loki_password: ${{ inputs.loki_password }} |
0 commit comments