mirror of https://github.com/knative/func.git
71 lines
2.4 KiB
YAML
71 lines
2.4 KiB
YAML
name: Func E2E OnCluster RT Test
|
|
|
|
on: [pull_request]
|
|
|
|
jobs:
|
|
test:
|
|
name: On Cluster RT Test
|
|
continue-on-error: true
|
|
strategy:
|
|
matrix:
|
|
os: ["ubuntu-latest"]
|
|
func_builder: ["pack", "s2i"]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- name: Set Environment Variables
|
|
run: |
|
|
echo "KUBECONFIG=${{ github.workspace }}/hack/bin/kubeconfig.yaml" >> "$GITHUB_ENV"
|
|
echo "PATH=${{ github.workspace }}/hack/bin:$PATH" >> "$GITHUB_ENV"
|
|
- uses: actions/checkout@v4
|
|
- uses: knative/actions/setup-go@main
|
|
- uses: imjasonh/setup-ko@v0.6
|
|
- name: Install Binaries
|
|
run: ./hack/install-binaries.sh
|
|
- name: Allocate Cluster
|
|
run: |
|
|
attempt=0
|
|
max_attempts=5
|
|
until [ $attempt -ge $max_attempts ]
|
|
do
|
|
attempt=$((attempt+1))
|
|
echo "------------------ Attempt $attempt ------------------"
|
|
./hack/allocate.sh && break
|
|
echo "------------------ failed, retrying... ------------------"
|
|
if [ $attempt -ge $max_attempts ]; then
|
|
echo "------------------ max # of retries reached, exiting ------------------"
|
|
exit 1
|
|
fi
|
|
./hack/delete.sh
|
|
echo "------------------ sleep for 5 minutes ------------------"
|
|
sleep 300
|
|
done
|
|
echo "------------------ finished! attempt $attempt ------------------"
|
|
- name: Setup testing images
|
|
run: ./hack/setup-testing-images.sh
|
|
- name: Deploy Tekton
|
|
run: ./hack/install-tekton.sh
|
|
- name: Deploy Test Git Server
|
|
run: ./hack/install-git-server.sh
|
|
- name: E2E On Cluster Test (Runtimes)
|
|
env:
|
|
TEST_TAGS: runtime
|
|
E2E_REGISTRY_URL: registry.default.svc.cluster.local:5000
|
|
FUNC_REPO_REF: ${{ github.event.pull_request.head.repo.full_name }}
|
|
FUNC_REPO_BRANCH_REF: ${{ github.head_ref }}
|
|
FUNC_BUILDER: ${{ matrix.func_builder }}
|
|
run: make test-e2e-on-cluster
|
|
- name: Dump Cluster Logs
|
|
if: always()
|
|
run: |
|
|
echo "::group::cluster events"
|
|
kubectl get events -A
|
|
echo "::endgroup::"
|
|
|
|
echo "::group::cluster containers logs"
|
|
stern '.*' --all-namespaces --no-follow
|
|
echo "::endgroup::"
|
|
- uses: codecov/codecov-action@v5
|
|
with:
|
|
files: ./coverage.txt
|
|
flags: e2e-test-oncluster-runtime
|