🌱 add Github action to capture logs and pod descriptions when e2e fails #4676
Workflow file for this run
This file contains hidden or 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: e2e | |
on: | |
workflow_dispatch: | |
pull_request: | |
merge_group: | |
push: | |
branches: | |
- main | |
jobs: | |
extension-developer-e2e: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Run the extension developer e2e test | |
run: make extension-developer-e2e | |
- name: Collect pod logs and descriptions on failure | |
if: failure() | |
run: | | |
echo "Fetching pod logs and descriptions..." | |
kubectl get pods -n olmv1-system -o wide || true | |
for pod in $(kubectl get pods -n olmv1-system -o name); do | |
echo "Collecting logs for $pod..." | |
kubectl logs $pod -n olmv1-system || true | |
echo "Describing $pod..." | |
kubectl describe $pod -n olmv1-system || true | |
done | |
env: | |
KUBECONFIG: ${{ secrets.KUBECONFIG }} | |
e2e-kind: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Run e2e tests | |
run: ARTIFACT_PATH=/tmp/artifacts make test-e2e | |
- name: Collect pod logs and descriptions on failure | |
if: failure() | |
run: | | |
echo "Fetching pod logs and descriptions..." | |
kubectl get pods -n olmv1-system -o wide || true | |
for pod in $(kubectl get pods -n olmv1-system -o name); do | |
echo "Collecting logs for $pod..." | |
kubectl logs $pod -n olmv1-system || true | |
echo "Describing $pod..." | |
kubectl describe $pod -n olmv1-system || true | |
done | |
env: | |
KUBECONFIG: ${{ secrets.KUBECONFIG }} | |
- uses: cytopia/[email protected] | |
if: failure() | |
with: | |
name: e2e-artifacts | |
path: /tmp/artifacts/ | |
- uses: codecov/codecov-action@v5 | |
with: | |
disable_search: true | |
files: coverage/e2e.out | |
flags: e2e | |
token: ${{ secrets.CODECOV_TOKEN }} | |
upgrade-e2e: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Run the upgrade e2e test | |
run: make test-upgrade-e2e | |
- name: Collect pod logs and descriptions on failure | |
if: failure() | |
run: | | |
echo "Fetching pod logs and descriptions..." | |
kubectl get pods -n olmv1-system -o wide || true | |
for pod in $(kubectl get pods -n olmv1-system -o name); do | |
echo "Collecting logs for $pod..." | |
kubectl logs $pod -n olmv1-system || true | |
echo "Describing $pod..." | |
kubectl describe $pod -n olmv1-system || true | |
done | |
env: | |
KUBECONFIG: ${{ secrets.KUBECONFIG }} |