Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Automatic GQL regression tests improvements #1342

Merged
merged 2 commits into from
Feb 16, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: curl + codegen
  • Loading branch information
bprusinowski committed Feb 16, 2024
commit 7aba5e32635dc91ca5374f0d6ede4477a074507c
33 changes: 18 additions & 15 deletions .github/workflows/performance-tests-pr.yml
Original file line number Diff line number Diff line change
@@ -10,24 +10,27 @@ jobs:
steps:
- name: Check out
uses: actions/checkout@v2
- name: Send an HTTP request to start up the server
run: |
curl '${{ github.event.deployment_status.target_url }}/api/graphql' -X 'POST' -H 'Content-Type: application/json' -d '{"operationName":"DataCubeObservations","variables":{"locale":"en","sourceType":"sparql","sourceUrl":"https://lindas.admin.ch/query","cubeFilter":{"iri":"https://energy.ld.admin.ch/sfoe/bfe_ogd84_einmalverguetung_fuer_photovoltaikanlagen/9","filters":{"https://energy.ld.admin.ch/sfoe/bfe_ogd84_einmalverguetung_fuer_photovoltaikanlagen/Kanton":{"type":"single","value":"https://ld.admin.ch/canton/1"}}}},"query":"query DataCubeObservations($sourceType: String!, $sourceUrl: String!, $locale: String!, $cubeFilter: DataCubeObservationFilter!) { dataCubeObservations(sourceType: $sourceType, sourceUrl: $sourceUrl, locale: $locale, cubeFilter: $cubeFilter) }"}'
- name: Run k6
uses: addnab/docker-run-action@v3
with:
image: grafana/k6:latest
options: -v ${{ github.workspace }}:/root
run: |
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/ - </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/ - </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/ - </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/ - </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/ - </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/ - </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/ - </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/ - </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/ - </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/ - </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/ - </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/ - </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/ - </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/ - </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/ - </root/k6/performance-tests/graphql/PossibleFilters.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/sfoe/bfe_ogd84_einmalverguetung_fuer_photovoltaikanlagen/9 --env CUBE_LABEL=Photovoltaikanlagen/9 --env ROOT_PATH=/root/ --env CHECK_TIMING=true - </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 - </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 - </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 - </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 - </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 - </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 - </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 - </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 - </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 - </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 - </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 - </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 - </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 - </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 - </root/k6/performance-tests/graphql/PossibleFilters.js
Loading