Skip to content

Fix panic when determining cluster domain. #45

Fix panic when determining cluster domain.

Fix panic when determining cluster domain. #45

name: "Integration Tests"
on:
pull_request_target:
types:
- labeled
jobs:
build-image:
runs-on: ubuntu-latest
if: ${{ github.event.label.name == 'ok to test' }}
steps:
- name: Remove label
uses: andymckay/labeler@master
with:
remove-labels: "ok to test"
if: always()
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: "${{ github.event.pull_request.head.sha }}"
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: stable
- name: Build image
run: |
make image-tar
- name: Upload image
uses: actions/upload-artifact@v3
with:
name: image
path: build-output/ambassador-agent-image.tar
test:
runs-on: ubuntu-latest
needs: build-image
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: "${{ github.event.pull_request.head.sha }}"
- name: Get last run
uses: ./.github/actions/rerun-cache
id: get_last_run
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: stable
- name: Setup kubectl
uses: azure/setup-kubectl@v3
id: kubectl
if: steps.get_last_run.outputs.passed != 'success'
- name: Download image
uses: actions/download-artifact@v3
if: steps.get_last_run.outputs.passed != 'success'
with:
name: image
- name: Prepare kluster
uses: ./.github/actions/prepare-kluster
if: steps.get_last_run.outputs.passed != 'success'
id: kluster
with:
token: ${{ secrets.DEV_AMBASSADOR_AGENT_KUBECEPTION_TOKEN }}
image-tar: ambassador-agent-image.tar
github-sha: ${{ github.event.pull_request.head.sha }}
- name: Run tests
if: steps.get_last_run.outputs.passed != 'success'
uses: nick-invision/retry@v2
with:
max_attempts: 3
timeout_minutes: 15
command: |
export DTEST_KUBECONFIG=${{ steps.kluster.outputs.kubeconfig }}
export KUBECONFIG=${{ steps.kluster.outputs.kubeconfig }}
export AMBASSADOR_AGENT_DOCKER_IMAGE=datawiredev/ambassador-agent:dev-latest
export KAT_SERVER_DOCKER_IMAGE=docker.io/datawiredev/kat-server:3.0.1-0.20220817135951-2cb28ef4f415
make go-integration-test
- name: Mark test as succesfull
run: echo "::set-output name=run_result::success" > run_result
- name: Cleanup kluster
uses: ./.github/actions/cleanup-kluster
if: always()
with:
token: ${{ secrets.DEV_AMBASSADOR_AGENT_KUBECEPTION_TOKEN }}
github-sha: ${{ github.event.pull_request.head.sha }}