forked from argoproj/argo-rollouts
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (56 loc) · 1.81 KB
/
e2e.yaml
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
49
50
51
52
53
54
55
56
57
58
name: E2E Tests
on:
push:
branches:
- 'master'
- 'release-*'
pull_request:
branches:
- 'master'
- 'release-*'
workflow_dispatch:
inputs:
debug_enabled:
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
jobs:
test-e2e:
name: Run end-to-end tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup k3s
run: |
curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.21.8+k3s1 sh -
sudo mkdir ~/.kube
sudo cp /etc/rancher/k3s/k3s.yaml ~/.kube/config
sudo chmod 755 ~/.kube/config
kubectl version
kubectl create ns argo-rollouts
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download cache
run: go mod download
- name: Install CRDs
run: |
kubectl apply -k manifests/crds
kubectl apply -f test/e2e/crds
- name: Start controller
run: make start-e2e 2>&1 | sed -r "s/[[:cntrl:]]\[[0-9]{1,3}m//g" > /tmp/e2e-controller.log &
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled}}
- name: Run e2e tests
run: make test-e2e
if: ${{ !(github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled) }}
- name: Upload e2e-controller logs
uses: actions/upload-artifact@v2
with:
name: e2e-controller-k8s.log
path: /tmp/e2e-controller.log
if: ${{ failure() }}