-
Notifications
You must be signed in to change notification settings - Fork 195
55 lines (45 loc) · 1.31 KB
/
ci-k8s.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
name: Parsl
on:
pull_request:
types:
- opened
- synchronize
jobs:
k8s-kind-suite:
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- uses: actions/checkout@master
- name: Create k8s Kind Cluster
uses: helm/kind-action@v1
with:
# kind tooling uses this name by default, but kind-action uses
# a different default name
cluster_name: kind
- name: Build docker image
uses: docker/build-push-action@v5
with:
context: .
tags: parsl:ci
- name: Push docker image into kubernetes cluster
run: |
kind load docker-image parsl:ci
- name: set liberal permissions
run: |
kubectl create clusterrolebinding serviceaccounts-cluster-admin --clusterrole=cluster-admin --group=system:serviceaccounts
- name: launch pytest Job
run: |
free -h
kubectl create -f ./pytest-task.yaml
- name: wait for pytest Job
run: |
# this pytest should take around 30 seconds to run, so 180 seconds
# should be plenty...
kubectl wait --timeout=180s --for=condition=Complete Job pytest
- name: report some info
if: ${{ always() }}
run: |
free -h
kubectl describe pods
kubectl describe jobs
kubectl logs Job/pytest