use correct package manager for fedora #39
Workflow file for this run
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: DPC Load Test | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- cr/dpc-4401 | |
jobs: | |
run-load-test: | |
name: "Run DPC API Load Test" | |
runs-on: self-hosted | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: ./dpc-app | |
- name: Install Go | |
run: | | |
if ! command -v go &> /dev/null; then | |
sudo dnf check-update | |
sudo dnf install golang-go | |
fi | |
- name: Start StatsD Integration | |
run: | | |
docker run -d \ | |
--name newrelic-statsd \ | |
-e NR_ACCOUNT_ID=${{ secrets.NEW_RELIC_ACCOUNT_ID }} \ | |
-e NR_API_KEY=${{ secrets.NEW_RELIC_API_KEY }} \ | |
-p 8125:8125/udp \ | |
newrelic/nri-statsd:latest | |
# StatsD integration is deprecated in current K6 version; need to build custom K6 build, | |
# see https://grafana.com/docs/k6/latest/results-output/real-time/statsd/ | |
- name: Build K6 with xk6-output-statsd | |
run: | | |
go install go.k6.io/xk6/cmd/xk6@latest | |
xk6 build --with github.com/LeonAdato/xk6-output-statsd | |
chmod +x k6 | |
- name: Run K6 with StatsD output | |
env: | |
LOAD_TEST_CLIENT_TOKEN: ${{ secrets.LOAD_TEST_CLIENT_TOKEN }} | |
LOAD_TEST_PRIVATE_KEY: ${{ secrets.LOAD_TEST_PRIVATE_KEY }} | |
LOAD_TEST_PUBLIC_KEY_ID: ${{ secrets.LOAD_TEST_PUBLIC_KEY_ID }} | |
run: | | |
./k6 run \ | |
--out statsd=addr=localhost:8125,enableTags=true \ | |
./dpc-app/dpc-load-testing/script.js | |
- name: Cleanup StatsD Container | |
if: always() | |
run: | | |
if [ $(docker ps -aq -f name=newrelic-statsd) ]; then | |
echo "Stopping and removing StatsD container" | |
docker stop newrelic-statsd | |
docker rm newrelic-statsd | |
fi |