From 23ae43d81aaa4a125a7ce8569c61ab32c279e655 Mon Sep 17 00:00:00 2001 From: itachi sasuke <8012032+Keithwachira@users.noreply.github.com> Date: Mon, 10 Mar 2025 12:11:12 +0300 Subject: [PATCH 1/2] add github action to run swagger contract tests --- .../run-dashboard-contract-tests.yaml | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 .github/workflows/run-dashboard-contract-tests.yaml diff --git a/.github/workflows/run-dashboard-contract-tests.yaml b/.github/workflows/run-dashboard-contract-tests.yaml new file mode 100644 index 00000000..d770cfb7 --- /dev/null +++ b/.github/workflows/run-dashboard-contract-tests.yaml @@ -0,0 +1,67 @@ +name: Run Open Api specifications contract tests with a live dashboard +on: + workflow_call: +permissions: + id-token: write + contents: read + +jobs: + run-test-with-live-dashboard: + runs-on: ubuntu-latest + name: Run Open Api specifications contract tests + steps: + # AWS Configuration + - uses: aws-actions/configure-aws-credentials@v4 + with: + role-session-name: cipush + aws-region: eu-central-1 + + # Amazon ECR login + - id: ecr + uses: aws-actions/amazon-ecr-login@v2 + with: + mask-password: 'true' + + # Set up Python + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + + # Checkout current repository + - name: Checkout current repository + uses: actions/checkout@v4 + + # Checkout tyk-pro repository + - name: Checkout tyk-pro repository + uses: actions/checkout@v4 + with: + repository: tyklabs/tyk-pro + path: tyk-pro + + - name: Append env variables + run: | + cd tyk-pro + echo >> local-mongo44.env + echo "TYK_DB_SECURITY_OPENPOLICY_ENABLEAPI=true" >> local-mongo44.env + echo "TYK_DB_ENABLEHASHEDKEYSLISTING=true" >> local-mongo44.env + # Install go-stask + - name: Install go-stask + uses: arduino/setup-task@v1 + with: + version: '3.39.0' + + # Run dashboard containers + - name: Run Dashboard containers + env: + pull_policy: 'always' + GH_TOKEN: ${{ secrets.ORG_GH_TOKEN }} + TYK_DB_LICENSEKEY: ${{ secrets.DASH_LICENSE }} + TYK_MDCB_LICENSE: ${{ secrets.MDCB_LICENSE }} + + + + - name: Clean up + run: | + cd tyk-pro + task clean FLAVOUR=pro-ha DB=mongo44 VARIATION=murmur128 From 4c9a3ed0dc3ec0fad3f2c807a106f6dbba4e1f36 Mon Sep 17 00:00:00 2001 From: itachi sasuke <8012032+Keithwachira@users.noreply.github.com> Date: Mon, 10 Mar 2025 12:33:13 +0300 Subject: [PATCH 2/2] fix blank lines --- .github/workflows/run-dashboard-contract-tests.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/run-dashboard-contract-tests.yaml b/.github/workflows/run-dashboard-contract-tests.yaml index d770cfb7..3396b689 100644 --- a/.github/workflows/run-dashboard-contract-tests.yaml +++ b/.github/workflows/run-dashboard-contract-tests.yaml @@ -59,8 +59,6 @@ jobs: TYK_DB_LICENSEKEY: ${{ secrets.DASH_LICENSE }} TYK_MDCB_LICENSE: ${{ secrets.MDCB_LICENSE }} - - - name: Clean up run: | cd tyk-pro