Skip to content

Commit 657df59

Browse files
committed
Run e2e test using GitHub actions
Signed-off-by: Tamal Saha <[email protected]>
1 parent 4903508 commit 657df59

3 files changed

Lines changed: 51 additions & 1 deletion

File tree

.github/workflows/go.yml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,37 @@ jobs:
2222
- name: Build
2323
env:
2424
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
25+
REGISTRY: docker.pkg.github.com/stashed/stash
2526
run: |
2627
docker login docker.pkg.github.com --username stashed --password ${DOCKER_TOKEN}
27-
make push REGISTRY=docker.pkg.github.com/stashed/stash
28+
make push
29+
30+
- name: Create Kubernetes Cluster
31+
id: kind
32+
uses: engineerd/[email protected]
33+
with:
34+
config: hack/github/cluster.yaml
35+
36+
- name: Install local-path provisioner
37+
id: local-path
38+
run: |
39+
export KUBECONFIG="$(kind get kubeconfig-path)"
40+
kubectl wait --for=condition=Ready nodes --all --timeout=5m
41+
kubectl get nodes
42+
kubectl delete storageclass --all
43+
kubectl apply -f https://github.com/rancher/local-path-provisioner/raw/master/deploy/local-path-storage.yaml
44+
kubectl wait --for=condition=Ready pods -n local-path-storage --all --timeout=5m
45+
46+
- name: Check out installer
47+
run: |
48+
cd ..
49+
git clone https://github.com/stashed/installer.git
50+
cd installer
51+
52+
- name: Run e2e tests
53+
env:
54+
REGISTRY: docker.pkg.github.com/stashed/stash
55+
run: |
56+
export KUBECONFIG="$(kind get kubeconfig-path)"
57+
make install
58+
make e2e-tests

hack/e2e/cluster.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
kind: Cluster
2+
apiVersion: kind.sigs.k8s.io/v1alpha3
3+
nodes:
4+
# the control plane node
5+
- role: control-plane
6+
extraMounts:
7+
- containerPath: /opt/local-path-provisioner
8+
hostPath: /mnt
9+
readOnly: false
10+
- role: worker
11+
extraMounts:
12+
- containerPath: /opt/local-path-provisioner
13+
hostPath: /mnt
14+
readOnly: false
15+
- role: worker
16+
extraMounts:
17+
- containerPath: /opt/local-path-provisioner
18+
hostPath: /mnt
19+
readOnly: false

minikube-linux-amd64

54.8 MB
Binary file not shown.

0 commit comments

Comments
 (0)