From 51b27863dcac3c8bcefd6204b061c21e6ec99c81 Mon Sep 17 00:00:00 2001 From: Miles Mason Winther <42948872+mmwinther@users.noreply.github.com> Date: Mon, 15 Apr 2024 14:23:07 +0200 Subject: [PATCH] Run mabl test against PR deployment (#285) * Mount a configmap with a dataset * Use an external ingres * Run mabl tests * Add label to mabl plan --- .github/workflows/integration-test.yml | 19 +++++++++++++++++++ .nais/staging-pr.yaml | 6 +++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 9bba2c9e..f8f34f14 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -86,3 +86,22 @@ jobs: RESOURCE: .nais/staging-pr.yaml VAR: image=${{ needs.docker-build.outputs.image-tag }},pr-number=${{github.event.number}} DEPLOY_SERVER: deploy.ssb.cloud.nais.io:443 + + mabl-test: + name: Run mabl tests + runs-on: ubuntu-latest + needs: deploy + steps: + - name: Run mabl tests + id: mabl-test-deployment + uses: mablhq/github-run-tests-action@v1 + env: + # Use a "CI/CD Integration" type of mabl API key + MABL_API_KEY: ${{ secrets.MABL_API_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + application-id: ${{ secrets.DATADOC_MABL_APPLICATION_ID }} + environment-id: ${{ secrets.DATADOC_MABL_ENVIRONMENT_ID }} + uri: https://datadoc-pr-${{github.event.number}}.external.staging.ssb.cloud.nais.io + mabl-branch: ${{ github.head_ref }} + plan-labels: Datadoc diff --git a/.nais/staging-pr.yaml b/.nais/staging-pr.yaml index 5ef61328..c3b8a372 100644 --- a/.nais/staging-pr.yaml +++ b/.nais/staging-pr.yaml @@ -34,7 +34,11 @@ spec: enabled: false ingresses: - - https://datadoc-pr-{{ pr-number }}.staging.ssb.cloud.nais.io + - https://datadoc-pr-{{ pr-number }}.external.staging.ssb.cloud.nais.io + + filesFrom: + - configmap: integration-test-dataset + mountPath: /var/run/datasets/ifpn/klargjorte_data/ liveness: path: /healthz/live