Skip to content

Commit

Permalink
fix: GQL performance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bprusinowski committed Feb 21, 2024
1 parent e082681 commit 79265f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/performance-tests-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ jobs:
image: grafana/k6:latest
options: -v ${{ github.workspace }}:/root -u root
run: |
mkdir -p /root/
touch /root/summary.txt
echo "$(k6 run --tag testid=DataCubeComponents --env ENV=PR --env ENDPOINT=${{ github.event.deployment_status.target_url }}/api/graphql --env CUBE_IRI=https://energy.ld.admin.ch/sfoe/bfe_ogd84_einmalverguetung_fuer_photovoltaikanlagen/9 --env CUBE_LABEL=Photovoltaikanlagen/9 --env ROOT_PATH=/root/ --env CHECK_TIMING=true --quiet - </root/k6/performance-tests/graphql/DataCubeComponents.js && k6 run --tag testid=DataCubeComponents --env ENV=PR --env ENDPOINT=${{ github.event.deployment_status.target_url }}/api/graphql --env CUBE_IRI=https://environment.ld.admin.ch/foen/nfi/nfi_C-20/cube/2023-3 --env CUBE_LABEL=NFI/2023-3 --env ROOT_PATH=/root/ --env CHECK_TIMING=true --quiet - </root/k6/performance-tests/graphql/DataCubeComponents.js && k6 run --tag testid=DataCubeComponents --env ENV=PR --env ENDPOINT=${{ github.event.deployment_status.target_url }}/api/graphql --env CUBE_IRI=https://energy.ld.admin.ch/elcom/electricityprice --env CUBE_LABEL=Elcom --env ROOT_PATH=/root/ --env CHECK_TIMING=true --quiet - </root/k6/performance-tests/graphql/DataCubeComponents.js && k6 run --tag testid=DataCubeMetadata --env ENV=PR --env ENDPOINT=${{ github.event.deployment_status.target_url }}/api/graphql --env CUBE_IRI=https://energy.ld.admin.ch/sfoe/bfe_ogd84_einmalverguetung_fuer_photovoltaikanlagen/9 --env CUBE_LABEL=Photovoltaikanlagen/9 --env ROOT_PATH=/root/ --env CHECK_TIMING=true --quiet - </root/k6/performance-tests/graphql/DataCubeMetadata.js && k6 run --tag testid=DataCubeMetadata --env ENV=PR --env ENDPOINT=${{ github.event.deployment_status.target_url }}/api/graphql --env CUBE_IRI=https://environment.ld.admin.ch/foen/nfi/nfi_C-20/cube/2023-3 --env CUBE_LABEL=NFI/2023-3 --env ROOT_PATH=/root/ --env CHECK_TIMING=true --quiet - </root/k6/performance-tests/graphql/DataCubeMetadata.js && k6 run --tag testid=DataCubeMetadata --env ENV=PR --env ENDPOINT=${{ github.event.deployment_status.target_url }}/api/graphql --env CUBE_IRI=https://energy.ld.admin.ch/elcom/electricityprice --env CUBE_LABEL=Elcom --env ROOT_PATH=/root/ --env CHECK_TIMING=true --quiet - </root/k6/performance-tests/graphql/DataCubeMetadata.js && k6 run --tag testid=DataCubeObservations --env ENV=PR --env ENDPOINT=${{ github.event.deployment_status.target_url }}/api/graphql --env CUBE_IRI=https://energy.ld.admin.ch/sfoe/bfe_ogd84_einmalverguetung_fuer_photovoltaikanlagen/9 --env CUBE_LABEL=Photovoltaikanlagen/9 --env ROOT_PATH=/root/ --env CHECK_TIMING=true --quiet - </root/k6/performance-tests/graphql/DataCubeObservations.js && k6 run --tag testid=DataCubeObservations --env ENV=PR --env ENDPOINT=${{ github.event.deployment_status.target_url }}/api/graphql --env CUBE_IRI=https://environment.ld.admin.ch/foen/nfi/nfi_C-20/cube/2023-3 --env CUBE_LABEL=NFI/2023-3 --env ROOT_PATH=/root/ --env CHECK_TIMING=true --quiet - </root/k6/performance-tests/graphql/DataCubeObservations.js && k6 run --tag testid=DataCubeObservations --env ENV=PR --env ENDPOINT=${{ github.event.deployment_status.target_url }}/api/graphql --env CUBE_IRI=https://energy.ld.admin.ch/elcom/electricityprice --env CUBE_LABEL=Elcom --env ROOT_PATH=/root/ --env CHECK_TIMING=true --quiet - </root/k6/performance-tests/graphql/DataCubeObservations.js && k6 run --tag testid=DataCubePreview --env ENV=PR --env ENDPOINT=${{ github.event.deployment_status.target_url }}/api/graphql --env CUBE_IRI=https://energy.ld.admin.ch/sfoe/bfe_ogd84_einmalverguetung_fuer_photovoltaikanlagen/9 --env CUBE_LABEL=Photovoltaikanlagen/9 --env ROOT_PATH=/root/ --env CHECK_TIMING=true --quiet - </root/k6/performance-tests/graphql/DataCubePreview.js && k6 run --tag testid=DataCubePreview --env ENV=PR --env ENDPOINT=${{ github.event.deployment_status.target_url }}/api/graphql --env CUBE_IRI=https://environment.ld.admin.ch/foen/nfi/nfi_C-20/cube/2023-3 --env CUBE_LABEL=NFI/2023-3 --env ROOT_PATH=/root/ --env CHECK_TIMING=true --quiet - </root/k6/performance-tests/graphql/DataCubePreview.js && k6 run --tag testid=DataCubePreview --env ENV=PR --env ENDPOINT=${{ github.event.deployment_status.target_url }}/api/graphql --env CUBE_IRI=https://energy.ld.admin.ch/elcom/electricityprice --env CUBE_LABEL=Elcom --env ROOT_PATH=/root/ --env CHECK_TIMING=true --quiet - </root/k6/performance-tests/graphql/DataCubePreview.js && k6 run --tag testid=PossibleFilters --env ENV=PR --env ENDPOINT=${{ github.event.deployment_status.target_url }}/api/graphql --env CUBE_IRI=https://energy.ld.admin.ch/sfoe/bfe_ogd84_einmalverguetung_fuer_photovoltaikanlagen/9 --env CUBE_LABEL=Photovoltaikanlagen/9 --env ROOT_PATH=/root/ --env CHECK_TIMING=true --quiet - </root/k6/performance-tests/graphql/PossibleFilters.js && k6 run --tag testid=PossibleFilters --env ENV=PR --env ENDPOINT=${{ github.event.deployment_status.target_url }}/api/graphql --env CUBE_IRI=https://environment.ld.admin.ch/foen/nfi/nfi_C-20/cube/2023-3 --env CUBE_LABEL=NFI/2023-3 --env ROOT_PATH=/root/ --env CHECK_TIMING=true --quiet - </root/k6/performance-tests/graphql/PossibleFilters.js && k6 run --tag testid=PossibleFilters --env ENV=PR --env ENDPOINT=${{ github.event.deployment_status.target_url }}/api/graphql --env CUBE_IRI=https://energy.ld.admin.ch/elcom/electricityprice --env CUBE_LABEL=Elcom --env ROOT_PATH=/root/ --env CHECK_TIMING=true --quiet - </root/k6/performance-tests/graphql/PossibleFilters.js)" > /root/summary.txt
- name: Set env variable for easier access
run: |
echo "SUMMARY=$(< summary.txt)" >> $GITHUB_ENV
echo "SUMMARY=$(< ${{ github.workspace }}/summary.txt)" >> $GITHUB_ENV
- name: GQL performance tests ❌
if: ${{ env.SUMMARY != '' }}
run: |
Expand Down
3 changes: 2 additions & 1 deletion k6/performance-tests/generate-github-actions.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,12 @@ jobs:
image: grafana/k6:latest
options: -v \${{ github.workspace }}:/root -u root
run: |
mkdir -p /root/
touch /root/summary.txt
echo "$(${commands})" > /root/summary.txt
- name: Set env variable for easier access
run: |
echo "SUMMARY=$(< summary.txt)" >> $GITHUB_ENV
echo "SUMMARY=$(< \${{ github.workspace }}/summary.txt)" >> $GITHUB_ENV
- name: GQL performance tests ❌
if: \${{ env.SUMMARY != '' }}
run: |
Expand Down

0 comments on commit 79265f7

Please sign in to comment.