1313jobs :
1414 tests :
1515 name : Unit Tests
16- runs-on : ubuntu-20.04
16+ runs-on : ubuntu-latest
1717 # 5m30
1818 timeout-minutes : 8
1919 steps :
@@ -33,16 +33,13 @@ jobs:
3333 - run : make server/static/files.go STATIC_FILES=false
3434 - run : go build -v ./...
3535 - run : make test STATIC_FILES=false GOTEST='go test -covermode=atomic -coverprofile=coverage.out'
36+ # engineers just ignore this in PRs, so lets not even run it
3637 - run : bash <(curl -s https://codecov.io/bash)
38+ if : github.ref == 'refs/heads/master'
3739
3840 e2e-tests :
3941 name : E2E Tests
40- runs-on : ubuntu-20.04
41- # test-api: 7m (1m10s locally)
42- # test-cli: 12m (4m locally)
43- # test-cron: 8m
44- # test-executor 8m (2m locally)
45- # test-functional: 13m (7m locally)
42+ runs-on : ubuntu-latest
4643 timeout-minutes : 20
4744 env :
4845 KUBECONFIG : /home/runner/.kubeconfig
@@ -57,14 +54,20 @@ jobs:
5754 containerRuntimeExecutor : docker
5855 profile : mysql
5956 - test : test-cron
60- containerRuntimeExecutor : docker
57+ containerRuntimeExecutor : emissary
6158 profile : minimal
62- - test : test-examples
59+ - test : test-executor
60+ containerRuntimeExecutor : emissary
61+ profile : minimal
62+ - test : test-functional
6363 containerRuntimeExecutor : emissary
6464 profile : minimal
6565 - test : test-executor
6666 containerRuntimeExecutor : docker
6767 profile : minimal
68+ - test : test-examples
69+ containerRuntimeExecutor : emissary
70+ profile : minimal
6871 - test : test-executor
6972 containerRuntimeExecutor : k8sapi
7073 profile : minimal
7477 - test : test-executor
7578 containerRuntimeExecutor : pns
7679 profile : minimal
77- - test : test-functional
78- containerRuntimeExecutor : docker
79- profile : minimal
8080 steps :
8181 - uses : actions/checkout@v2
8282 - uses : actions/setup-go@v2
9494 with :
9595 path : /home/runner/go/bin
9696 key : go-bin-v1-${{ hashFiles('**/go.mod') }}
97+ - name : Cache Docker layers
98+ uses : actions/cache@v2
99+ with :
100+ path : /tmp/.buildx-cache
101+ key : ${{ runner.os }}-buildx-${{ github.sha }}
102+ restore-keys : |
103+ ${{ runner.os }}-buildx-
104+ - uses : docker/setup-buildx-action@v1
97105 - run : mkdir -p /tmp/log/argo-e2e
106+ # we never want to pull images by accident on CI after we built them
107+ # so imagePullPolicy=Never
108+ # but, we can pull it if we don't need it
109+ - run : docker pull quay.io/argoproj/argoexec:latest
110+ if : ${{!(matrix.test == 'test-executor' || matrix.test == 'test-functional')}}
111+ - name : make argoexec-image
112+ if : ${{matrix.test == 'test-executor' || matrix.test == 'test-functional'}}
113+ # retry this once, as it can be flakey
114+ run : |
115+ make argoexec-image STATIC_FILES=false || make argoexec-image STATIC_FILES=false
116+ docker image prune -f
98117 - name : Install and start K3S
99- timeout-minutes : 3
100118 run : |
101119 curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.21.2+k3s1 INSTALL_K3S_CHANNEL=stable INSTALL_K3S_EXEC=--docker K3S_KUBECONFIG_MODE=644 sh -
102120 until kubectl --kubeconfig=/etc/rancher/k3s/k3s.yaml cluster-info ; do sleep 10s ; done
@@ -113,21 +131,20 @@ jobs:
113131 echo '127.0.0.1 mysql' | sudo tee -a /etc/hosts
114132 - run : make install controller cli $(go env GOPATH)/bin/goreman PROFILE=${{matrix.profile}} E2E_EXECUTOR=${{matrix.containerRuntimeExecutor}} AUTH_MODE=client STATIC_FILES=false LOG_LEVEL=info
115133 - run : make start PROFILE=${{matrix.profile}} E2E_EXECUTOR=${{matrix.containerRuntimeExecutor}} AUTH_MODE=client STATIC_FILES=false LOG_LEVEL=info UI=false > /tmp/log/argo-e2e/argo.log 2>&1 &
116- timeout-minutes : 4
117- - name : make argoexec-image
118- run : make argoexec-image STATIC_FILES=false
119134 - run : make wait
120135 timeout-minutes : 4
121136 - run : make ${{matrix.test}} E2E_TIMEOUT=1m STATIC_FILES=false
122137 - name : cat argo.log
123138 if : ${{ failure() }}
124139 run : cat /tmp/log/argo-e2e/argo.log
125-
140+ - name : MinIO logs
141+ if : ${{ failure() }}
142+ run : kubectl -n argo logs deploy/minio
126143 codegen :
127144 name : Codegen
128- runs-on : ubuntu-20.04
145+ runs-on : ubuntu-latest
129146 needs : [ tests ]
130- timeout-minutes : 9
147+ timeout-minutes : 15
131148 env :
132149 GOPATH : /home/runner/go
133150 PROTOC_ZIP : protoc-3.11.1-linux-x86_64.zip
@@ -173,7 +190,7 @@ jobs:
173190
174191 lint :
175192 name : Lint
176- runs-on : ubuntu-20.04
193+ runs-on : ubuntu-latest
177194 needs : [ tests, codegen ]
178195 timeout-minutes : 6
179196 env :
@@ -187,7 +204,7 @@ jobs:
187204
188205 ui :
189206 name : UI
190- runs-on : ubuntu-20.04
207+ runs-on : ubuntu-latest
191208 timeout-minutes : 6
192209 env :
193210 NODE_OPTIONS : --max-old-space-size=4096
0 commit comments