forked from fission/fission
-
Notifications
You must be signed in to change notification settings - Fork 0
140 lines (119 loc) · 3.56 KB
/
push_pr.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: Fission CI
on:
push:
branches:
- master
paths:
- "**.go"
- "charts/**"
- "test/**"
- go.mod
- go.sum
pull_request:
branches:
- master
paths:
- "**.go"
- "charts/**"
- "test/**"
- go.mod
- go.sum
workflow_dispatch:
jobs:
# Job to run change detection
integration-test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
kindversion: ["v1.19.11", "v1.20.7", "v1.21.1"]
os: [ubuntu-latest]
steps:
- name: setup go
uses: actions/setup-go@v2
with:
go-version: 1.16
- name: Checkout sources
uses: actions/[email protected]
- name: Checkout sources
uses: actions/[email protected]
with:
repository: fission/examples
path: examples
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Helm installation
uses: Azure/setup-helm@v1
with:
version: v3.3.4
- name: Kind Clutser
uses: engineerd/[email protected]
with:
image: kindest/node:${{ matrix.kindversion }}
version: v0.11.1
config: kind.yaml
- name: Configuring and testing the Installation
run: |
kubectl cluster-info --context kind-kind
kubectl get nodes
sudo apt-get install -y apache2-utils
- name: Helm chart lint
run: |
helm lint charts/fission-all/
- name: Helm update
run: helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
- name: Install Skaffold
run: |
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64
sudo install skaffold /usr/local/bin/
skaffold version
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
install-only: true
- name: Build and Install Fission
run: |
kubectl create ns fission
make create-crds
SKAFFOLD_PROFILE=kind-ci make skaffold-deploy
- name: Build and Install Fission CLI
run: |
make build-fission-cli
sudo make install-fission-cli
sudo chmod +x /usr/local/bin/fission
- name: Port-forward fission components
run: |
kubectl port-forward svc/router 8888:80 -nfission &
kubectl port-forward svc/controller 8889:80 -nfission &
kubectl port-forward svc/nats-streaming 8890:4222 -nfission &
- name: Get fission version
run: |
fission version
- name: Integration tests
run: ./test/kind_CI.sh
- name: Collect Fission Dump
if: ${{ always() }}
run: |
command -v fission && fission support dump
- name: Kind export logs
if: ${{ always() }}
run: |
kind export logs --name kind kind-logs
- name: Archive fission dump
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: fission-dump-${{ github.run_id }}-${{ matrix.kindversion }}
path: fission-dump/*.zip
retention-days: 5
- name: Archive kind logs
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: kind-logs-${{ github.run_id }}-${{ matrix.kindversion }}
path: kind-logs/*
retention-days: 5