Skip to content

Gateway Automated Tests #11

Gateway Automated Tests

Gateway Automated Tests #11

name: Gateway Automated Tests
on:
workflow_dispatch:
inputs:
gateway_image:
description: 'Docker Image for Tests'
required: true
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}
permissions:
actions: read
contents: read
checks: write
statuses: write
env:
VITE_PORTAL_API_URL: ${{ vars.VITE_PORTAL_API_URL }}
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
with:
egress-policy: audit
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
submodules: 'recursive'
- name: Install deps
uses: './.github/reusable-steps/install-deps'
- name: Run site
uses: './.github/reusable-steps/run-site'
- name: Download Kong License
uses: Kong/kong-license@master
id: getLicense
with:
op-token: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
- name: Generate instruction files
uses: './.github/reusable-steps/generate-instruction-files'
- name: Set Gateway Image and Tag
run: |
INPUT_IMAGE="${{ inputs.gateway_image }}"
echo "KONG_IMAGE_NAME=${INPUT_IMAGE%:*}" >> $GITHUB_ENV
echo "KONG_IMAGE_TAG=${INPUT_IMAGE##*:}" >> $GITHUB_ENV
- name: Run tests
working-directory: tools/automated-tests
env:
KONG_LICENSE_DATA: ${{ steps.getLicense.outputs.license }}
RUNTIME: gateway
PRODUCT: gateway
GATEWAY_VERSION: next
KONG_IMAGE_TAG: ${{ env.KONG_IMAGE_TAG }}
KONG_IMAGE_NAME: ${{ env.KONG_IMAGE_NAME }}
run: |
DEBUG=tests:*,debug npm run run-tests
- name: Publish Test Report
uses: './.github/reusable-steps/publish-test-report'
if: always()