Home

Awesome

Kong Pongo action

A Github Action for running plugin tests using Kong Pongo.

Usage

See the Kong Pongo repo for help on Pongo commands and environments.

This action will install and configure Pongo for a specific version of Kong Gateway to test against. The settings will be exported as standard Pongo environment variables, such that any follow up commands will work with the same settings.

Inputs

inputdefaultrequireddescription
kong_versionyesThe Kong Gateway version to test your plugin against. Check the Pongo documentation for allowed formats for latest patch releases and/or nightly builds.
pongo_version"latest"yesThe Pongo version to use for testing. This can be a Pongo version tag or branch name (use "master" for bleeding-edge). A special case is "latest" which will use the latest released version.
start_environment"true"noBy default the test environment will be spun up. Set this value to "false" to not start the test environment.
build_image"true"noBy default the test image will be build. Set this value to "false" to not build the test image.
licensevalue of env var KONG_LICENSE_DATAnoThe Kong license. This is only required if you are testing a plugin against an Enterprise version of the Kong Gateway. </br>Note: make sure to pass it to Github as a secret!

Example

# .github/workflows/test.yaml

name: "Test"
on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest

    strategy:
      fail-fast: false
      matrix:
        kong_version:
        - "2.7.x"
        - "2.8.x"
        - "dev"

    steps:
    - uses: actions/checkout@v3

    # install Pongo, build the image for the Kong version, and
    # start the environment (postgres, cassandra, etc)
    - uses: Kong/kong-pongo-action@v1
      with:
        kong_version: ${{ matrix.kong_version }}

    # Pongo commands will now work after the setup step above
    - run: pongo run

History

Version 1.0.3 (released 28-Aug-2024)

Version 1.0.2 (released 26-Feb-2023)

Version 1.0.1 (released 20-Oct-2022)

Version 1 (released 7-Jul-2022)