Add Helm Chart to install NKG #34
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: Conformance Testing | |
on: | |
push: | |
branches: | |
- main | |
- release-* | |
pull_request: | |
branches: | |
- main | |
- release-* | |
types: | |
- opened | |
- reopened | |
- synchronize | |
schedule: | |
- cron: '0 4 * * *' | |
concurrency: | |
group: ${{ github.ref_name }}-conformance | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
conformance-tests: | |
name: Gateway Conformance Tests | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- name: Setup Golang Environment | |
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 | |
with: | |
go-version-file: go.mod | |
- name: Set GOPATH | |
run: echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV | |
- name: Docker Buildx | |
uses: docker/setup-buildx-action@4c0219f9ac95b02789c1075625400b2acbff50b1 # v2.9.1 | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@818d4b7b91585d195f67373fd9cb0332e31a7175 # v4.6.0 | |
with: | |
images: | | |
name=ghcr.io/nginxinc/nginx-kubernetes-gateway | |
tags: | | |
type=semver,pattern={{version}} | |
type=edge | |
type=ref,event=pr | |
type=ref,event=branch,suffix=-rc,enable=${{ startsWith(github.ref, 'refs/heads/release') }} | |
- name: Prepare NKG files | |
run: | | |
nkg_prefix=$(echo ${{ steps.meta.outputs.tags }} | cut -d ":" -f 1) | |
nkg_tag=$(echo ${{ steps.meta.outputs.tags }} | cut -d ":" -f 2) | |
make update-nkg-manifest NKG_PREFIX=${nkg_prefix} NKG_TAG=${nkg_tag} | |
working-directory: ./conformance | |
- name: Build binary | |
uses: goreleaser/goreleaser-action@336e29918d653399e599bfca99fadc1d7ffbc9f7 # v4.3.0 | |
with: | |
version: latest | |
args: build --snapshot --clean | |
- name: Build Docker Image | |
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1 | |
with: | |
file: build/Dockerfile | |
tags: ${{ steps.meta.outputs.tags }} | |
context: "." | |
target: goreleaser | |
load: true | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
pull: true | |
- name: Update Go Modules | |
if: ${{ github.event_name == 'schedule' }} | |
run: make update-go-modules | |
working-directory: ./conformance | |
- name: Build Test Docker Image | |
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1 | |
with: | |
file: conformance/tests/Dockerfile | |
tags: conformance-test-runner:${{ github.sha }} | |
context: "." | |
load: true | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
pull: true | |
- name: Deploy Kubernetes | |
id: k8s | |
run: | | |
make create-kind-cluster KIND_KUBE_CONFIG=${{ github.workspace }}/kube-${{ github.run_id }} | |
echo "KUBECONFIG=${{ github.workspace }}/kube-${{ github.run_id }}" >> "$GITHUB_ENV" | |
working-directory: ./conformance | |
- name: Setup conformance tests | |
run: | | |
nkg_prefix=$(echo ${{ steps.meta.outputs.tags }} | cut -d ":" -f 1) | |
nkg_tag=$(echo ${{ steps.meta.outputs.tags }} | cut -d ":" -f 2) | |
if [ ${{ github.event_name }} == "schedule" ]; then | |
export GW_API_VERSION=main | |
fi | |
make install-nkg-local-no-build NKG_PREFIX=${nkg_prefix} NKG_TAG=${nkg_tag} | |
working-directory: ./conformance | |
- name: Run conformance tests | |
run: make run-conformance-tests TAG=${{ github.sha }} | |
working-directory: ./conformance |