diff --git a/.github/workflows/manual-load-test.yml b/.github/workflows/manual-load-test.yml index 9dff34e11..b5287c64f 100644 --- a/.github/workflows/manual-load-test.yml +++ b/.github/workflows/manual-load-test.yml @@ -36,27 +36,27 @@ jobs: - name: Testing GraphQL - Components if: always() - uses: grafana/k6-action@v0.2.0 + uses: grafana/k6-action@v0.3.1 with: - filename: k6/graphql/components.js + filename: k6/load-tests/graphql/components.js cloud: ${{ inputs.cloud }} token: ${{ secrets.K6_CLOUD_API_TOKEN }} flags: --env ENV=${{ env.ENV }} --env ENABLE_GQL_SERVER_SIDE_CACHE=${{ env.ENABLE_GQL_SERVER_SIDE_CACHE }} - name: Testing GraphQL - Observations if: always() - uses: grafana/k6-action@v0.2.0 + uses: grafana/k6-action@v0.3.1 with: - filename: k6/graphql/observations.js + filename: k6/load-tests/graphql/observations.js cloud: ${{ inputs.cloud }} token: ${{ secrets.K6_CLOUD_API_TOKEN }} flags: --env ENV=${{ env.ENV }} --env ENABLE_GQL_SERVER_SIDE_CACHE=${{ env.ENABLE_GQL_SERVER_SIDE_CACHE }} - name: Testing HAR - Edition if: always() - uses: grafana/k6-action@v0.2.0 + uses: grafana/k6-action@v0.3.1 with: - filename: k6/har/${{ env.ENV }}/edition.js + filename: k6/load-tests/har/${{ env.ENV }}/edition.js cloud: ${{ inputs.cloud }} token: ${{ secrets.K6_CLOUD_API_TOKEN }} flags: --env ENABLE_GQL_SERVER_SIDE_CACHE=${{ env.ENABLE_GQL_SERVER_SIDE_CACHE }} diff --git a/.github/workflows/performance-tests.yml b/.github/workflows/performance-tests.yml new file mode 100644 index 000000000..81ae748ad --- /dev/null +++ b/.github/workflows/performance-tests.yml @@ -0,0 +1,17 @@ +name: Performance tests + +on: workflow_dispatch + +jobs: + compile: + name: Compile site assets + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v2 + - name: Run the build process with Docker + uses: addnab/docker-run-action@v3 + with: + image: grafana/k6:latest + options: -rm -e K6_PROMETHEUS_RW_USERNAME=${{ secrets.K6_PROMETHEUS_RW_USERNAME }} -e K6_PROMETHEUS_RW_PASSWORD=${{ secrets.K6_PROMETHEUS_RW_PASSWORD }} -e K6_PROMETHEUS_RW_SERVER_URL=${{ secrets.K6_PROMETHEUS_RW_SERVER_URL }} + run: k6 run -o experimental-prometheus-rw --tag testid=StateAccounts_Office/4/ --env ENV=test --env CUBE=StateAccounts_Office/4/ - { + const file = `name: Performance tests + +on: workflow_dispatch + +jobs: + compile: + name: Compile site assets + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v2 + - name: Run the build process with Docker + uses: addnab/docker-run-action@v3 + with: + image: grafana/k6:latest + options: -rm -e K6_PROMETHEUS_RW_USERNAME=\${{ secrets.K6_PROMETHEUS_RW_USERNAME }} -e K6_PROMETHEUS_RW_PASSWORD=\${{ secrets.K6_PROMETHEUS_RW_PASSWORD }} -e K6_PROMETHEUS_RW_SERVER_URL=\${{ secrets.K6_PROMETHEUS_RW_SERVER_URL }} + run: ${envs + .map((env) => { + return queries.map((query) => { + return cubes.map((cube) => { + return `k6 run -o experimental-prometheus-rw --tag testid=${cube} --env ENV=${env} --env CUBE=${cube} -