fix(migrations) add Kuma compatibility #734
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR tests | |
concurrency: | |
# Run only for most recent commit in PRs but for all tags and commits on main | |
# Ref: https://docs.github.com/en/actions/using-jobs/using-concurrency | |
group: ${{ github.workflow }}-${{ github.head_ref || github.sha }} | |
cancel-in-progress: true | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: setup golang | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '^1.20' | |
- name: cache go modules | |
uses: actions/cache@v3 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-build-codegen-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-build-codegen- | |
- name: Run linters | |
run: make lint | |
lint-test: | |
runs-on: ubuntu-latest | |
env: | |
# Specify this here because these tests rely on ktf to run kind for cluster creation. | |
KIND_VERSION: v0.20.0 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Helm | |
uses: azure/setup-helm@v3 | |
with: | |
version: v3.11.0 | |
- name: Add Helm repos | |
run: | | |
helm repo add bitnami https://charts.bitnami.com/bitnami | |
helm repo add kong https://charts.konghq.com | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Set up chart-testing | |
uses: helm/[email protected] | |
- name: Run chart-testing (lint) | |
run: ct lint --check-version-increment=false | |
- name: setup testing environment (kind-cluster) | |
env: | |
KUBERNETES_VERSION: ${{ matrix.kubernetes-version }} | |
run: ./scripts/test-env.sh | |
- name: Run chart-testing (install) | |
run: ct install --charts charts/kong | |
integration-test: | |
runs-on: ubuntu-latest | |
env: | |
# Specify this here because these tests rely on ktf to run kind for cluster creation. | |
KIND_VERSION: v0.20.0 | |
strategy: | |
matrix: | |
kubernetes-version: | |
- "1.21.14" | |
- "1.22.15" | |
- "1.23.13" | |
- "1.24.7" | |
- "1.25.9" | |
- "1.26.4" | |
- "1.27.1" | |
chart-name: | |
- kong | |
- ingress | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: setup helm | |
uses: azure/setup-helm@v3 | |
with: | |
version: v3.11.0 | |
- name: setup testing environment (kind-cluster) | |
env: | |
KUBERNETES_VERSION: ${{ matrix.kubernetes-version }} | |
run: ./scripts/test-env.sh | |
- name: run integration tests (integration) | |
env: | |
CHART_NAME: ${{ matrix.chart-name }} | |
run: ./scripts/test-run.sh | |
- name: run upgrade integration tests (integration-upgrade) | |
env: | |
CHART_NAME: ${{ matrix.chart-name }} | |
run: ./scripts/test-upgrade.sh | |
- name: cleanup integration tests (cleanup) | |
run: ./scripts/test-env.sh cleanup | |
# Workaround to allow checking the matrix tests as required tests without adding the individual cases | |
# Ref: https://github.com/orgs/community/discussions/26822#discussioncomment-3305794 | |
passed: | |
runs-on: ubuntu-latest | |
needs: | |
- lint | |
- lint-test | |
- integration-test | |
if: always() | |
steps: | |
- if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }} | |
run: | | |
echo "Some jobs failed or were cancelled." | |
exit 1 |