K6 stress test #6
This file contains 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
name: K6 stress test | |
on: | |
workflow_dispatch: | |
jobs: | |
test: | |
name: Run k6 test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@main | |
- name: Install k6 | |
run: | | |
wget -qO- $(curl -s https://api.github.com/repos/grafana/k6/releases/latest | grep browser_download_url | grep linux-amd64.tar.gz | cut -d '"' -f 4) | tar xvz --strip-components 1 | |
- name: Run tests | |
env: | |
TEST_FILE: stress.js | |
K6_PROMETHEUS_RW_TREND_AS_NATIVE_HISTOGRAM: true | |
K6_PROMETHEUS_RW_SERVER_URL: http://${{ secrets.PROMETHEUS_IP }}/api/v1/write | |
API_IP: ${{ secrets.API_IP }} | |
run: | | |
./k6 run $TEST_FILE --quiet --include-system-env-vars -o experimental-prometheus-rw | |
- name: Upload artifact | |
uses: actions/upload-artifact@main | |
with: | |
name: test-results | |
path: | | |
./summary.txt | |
./result.html |