-
Notifications
You must be signed in to change notification settings - Fork 30
48 lines (41 loc) · 1.51 KB
/
e2e.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: e2e tests
on:
push:
branches: ["main"]
pull_request_target:
types: ["opened", "synchronize", "reopened", "labeled", "unlabeled"]
branches: ["main"]
jobs:
e2e:
if: ${{ ! contains( github.event.pull_request.labels.*.name, 'e2e/none') }}
runs-on: [capmox,e2e,dcd-playground]
environment: e2e
env:
PROXMOX_URL: ${{ secrets.PROXMOX_URL }}
PROXMOX_TOKEN: ${{ secrets.PROXMOX_TOKEN }}
PROXMOX_SECRET: ${{ secrets.PROXMOX_SECRET }}
SKIP_E2E: Flatcar
steps:
- name: Check out branch ${{ github.ref }}
if: ${{ github.event_name == 'push' }}
uses: actions/checkout@v4.1.1
- name: Check out PR ${{ github.event.pull_request.number }}
if: ${{ github.event_name == 'pull_request_target' }}
uses: actions/checkout@v4.1.1
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Check if requested to skip Flatcar tests
if: ${{ contains( github.event.pull_request.labels.*.name, 'e2e/flatcar') }}
run: echo 'SKIP_E2E=""' >> "$GITHUB_ENV"
- name: Run e2e tests
run: "make test-e2e GINKGO_SKIP=${{ env.SKIP_E2E }}"
- name: Cleanup kind clusters
uses: gacts/run-and-post-run@v1
with:
post: |
kind get clusters | xargs -I% kind delete cluster --name %
docker system prune -a -f