main.yml 18.2 KB
Newer Older
1
name: CI
2
on: [pull_request]
3 4
env:
  GOPROXY: https://proxy.golang.org
5
jobs:
M
Medya Gh 已提交
6
  # Runs before all other jobs
7
  # builds the minikube binaries
M
Medya Gh 已提交
8
  build_minikube:
R
Rohan Maity 已提交
9
    env:
10 11
      TIME_ELAPSED: time
      JOB_NAME: "Docker_Ubuntu_16_04"
M
Medya Gh 已提交
12
      GOPOGH_RESULT: ""
M
Medya Gh 已提交
13
    runs-on: ubuntu-18.04
14 15
    steps:
    - uses: actions/checkout@v2
16 17
    - name: Download Dependencies
      run : go mod download
18
    - name: Build Binaries
19 20 21
      run : |
        make minikube-linux-amd64
        make e2e-linux-amd64
M
Medya Gh 已提交
22
        cp -r test/integration/testdata ./out
23 24 25 26 27 28 29
        whoami
        echo github ref $GITHUB_REF
        echo workflow $GITHUB_WORKFLOW
        echo home $HOME
        echo event name $GITHUB_EVENT_NAME
        echo workspace $GITHUB_WORKSPACE
        echo "end of debug stuff"
M
Medya Gh 已提交
30
        echo $(which jq)
M
Medya Gh 已提交
31 32 33 34
    - uses: actions/upload-artifact@v1
      with:
        name: minikube_binaries
        path: out
M
Medya Gh 已提交
35 36 37 38 39 40 41 42
  lint:
    env:
      TIME_ELAPSED: time
      JOB_NAME: "lint"
      GOPOGH_RESULT: ""
    runs-on: ubuntu-18.04
    steps:
    - uses: actions/checkout@v2
43
    - name: Install libvirt
44
      run : |
M
Medya Gh 已提交
45 46
        sudo apt-get update
        sudo apt-get install -y libvirt-dev
47 48
    - name: Download Dependencies
      run : go mod download
49
    - name: Lint
M
Medya Gh 已提交
50 51 52 53
      env:
        TESTSUITE: lintall
      run : make test
      continue-on-error: false
M
Medya Gh 已提交
54 55 56 57
  unit_test:
    env:
      TIME_ELAPSED: time
      JOB_NAME: "unit_test"
M
Medya Gh 已提交
58
      GOPOGH_RESULT: ""
M
Medya Gh 已提交
59 60 61
    runs-on: ubuntu-18.04
    steps:
    - uses: actions/checkout@v2
62
    - name: Install libvirt
63
      run : |
M
Medya Gh 已提交
64 65
        sudo apt-get update
        sudo apt-get install -y libvirt-dev
66 67
    - name: Download Dependencies
      run : go mod download
68
    - name: Unit Test
69 70 71
      env:
        TESTSUITE: unittest
      run :
M
Medya Gh 已提交
72
        make test
73
      continue-on-error: false
M
Medya Gh 已提交
74 75 76 77 78 79 80
  # Run the following integration tests after the build_minikube
  # They will run in parallel and use the binaries in previous step
  docker_ubuntu_16_04:
    needs: [build_minikube]
    env:
      TIME_ELAPSED: time
      JOB_NAME: "Docker_Ubuntu_16_04"
M
Medya Gh 已提交
81
      GOPOGH_RESULT: ""
M
Medya Gh 已提交
82
      SHELL: "/bin/bash" # To prevent https://github.com/kubernetes/minikube/issues/6643
M
Medya Gh 已提交
83 84
    runs-on: ubuntu-16.04
    steps:
85 86 87 88 89 90
    - name: Docker Info
      shell: bash
      run: |
        docker info || true
        docker version || true
        docker ps || true
M
Medya Gh 已提交
91
    - name: Install gopogh
92
      shell: bash
93
      run: |
M
Medya Gh 已提交
94
        curl -LO https://github.com/medyagh/gopogh/releases/download/v0.1.16/gopogh-linux-amd64
M
Medya Gh 已提交
95
        sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
96
    - name: Download Binaries
M
Medya Gh 已提交
97 98 99
      uses: actions/download-artifact@v1
      with:
        name: minikube_binaries
100
    - name: Run Integration Test
M
Medya Gh 已提交
101
      continue-on-error: true
102 103
      # bash {0} to allow test to continue to next step. in case of
      shell: bash {0}
104
      run: |
M
Medya Gh 已提交
105 106 107 108 109
        cd minikube_binaries
        mkdir -p report
        mkdir -p testhome
        chmod a+x e2e-*
        chmod a+x minikube-*
R
Rohan Maity 已提交
110
        START_TIME=$(date -u +%s)
S
Sharif Elgamal 已提交
111
        KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome ./e2e-linux-amd64 -minikube-start-args=--vm-driver=docker -test.timeout=70m -test.v -timeout-multiplier=3 -binary=./minikube-linux-amd64 2>&1 | tee ./report/testout.txt
R
Rohan Maity 已提交
112
        END_TIME=$(date -u +%s)
113
        TIME_ELAPSED=$(($END_TIME-$START_TIME))
114 115 116 117
        min=$((${TIME_ELAPSED}/60))
        sec=$((${TIME_ELAPSED}%60))
        TIME_ELAPSED="${min} min $sec seconds "
        echo ::set-env name=TIME_ELAPSED::${TIME_ELAPSED}
118
    - name: Generate HTML Report
119
      shell: bash
120
      run: |
M
Medya Gh 已提交
121
        cd minikube_binaries
122 123
        export PATH=${PATH}:`go env GOPATH`/bin
        go tool test2json -t < ./report/testout.txt > ./report/testout.json || true
M
Medya Gh 已提交
124
        STAT=$(gopogh -in ./report/testout.json -out ./report/testout.html -name "${JOB_NAME} ${GITHUB_REF}" -repo "${GITHUB_REPOSITORY}"  -details "${GITHUB_SHA}")  || true
125
        echo status: ${STAT}
M
Medya Gh 已提交
126
        FailNum=$(echo $STAT | jq '.NumberOfFail')
127
        TestsNum=$(echo $STAT | jq '.NumberOfTests')
M
Medya Gh 已提交
128 129 130
        GOPOGH_RESULT="${JOB_NAME} : completed with ${FailNum} / ${TestsNum} failures in ${TIME_ELAPSED}"
        echo ::set-env name=GOPOGH_RESULT::${GOPOGH_RESULT}
        echo ::set-env name=STAT::${STAT}
131 132
    - uses: actions/upload-artifact@v1
      with:
133
        name: docker_ubuntu_16_04
M
Medya Gh 已提交
134
        path: minikube_binaries/report
M
Medya Gh 已提交
135
    - name: The End Result Docker on ubuntu 16:04
M
Medya Gh 已提交
136
      shell: bash
137 138
      run: |
        echo ${GOPOGH_RESULT}
M
Medya Gh 已提交
139 140
        numFail=$(echo $STAT | jq '.NumberOfFail')
        echo "----------------${numFail} Failures----------------------------"
141
        echo $STAT | jq '.FailedTests' || true
M
Medya Gh 已提交
142 143
        echo "-------------------------------------------------------"
        if [ "$numFail" -gt 0 ];then echo "*** $numFail Failed ***";exit 2;fi
144
  docker_ubuntu_18_04:
M
Medya Gh 已提交
145
    runs-on: ubuntu-18.04
R
Rohan Maity 已提交
146
    env:
147 148
      TIME_ELAPSED: time
      JOB_NAME: "Docker_Ubuntu_18_04"
M
Medya Gh 已提交
149
      GOPOGH_RESULT: ""
M
Medya Gh 已提交
150
      SHELL: "/bin/bash" # To prevent https://github.com/kubernetes/minikube/issues/6643
M
Medya Gh 已提交
151
    needs: [build_minikube]
152
    steps:
153 154 155 156 157 158
    - name: Docker Info
      shell: bash
      run: |
        docker info || true
        docker version || true
        docker ps || true
M
Medya Gh 已提交
159
    - name: Install gopogh
160
      shell: bash
161
      run: |
M
Medya Gh 已提交
162
        curl -LO https://github.com/medyagh/gopogh/releases/download/v0.1.16/gopogh-linux-amd64
M
Medya Gh 已提交
163
        sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
164
    - name: Download Binaries
M
Medya Gh 已提交
165 166 167
      uses: actions/download-artifact@v1
      with:
        name: minikube_binaries
168
    - name: Run Integration Test
M
Medya Gh 已提交
169
      continue-on-error: true
170 171
      # bash {0} to allow test to continue to next step. in case of
      shell: bash {0}
172
      run: |
M
Medya Gh 已提交
173 174 175 176 177
        cd minikube_binaries
        mkdir -p report
        mkdir -p testhome
        chmod a+x e2e-*
        chmod a+x minikube-*
R
Rohan Maity 已提交
178
        START_TIME=$(date -u +%s)
S
Sharif Elgamal 已提交
179
        KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome ./e2e-linux-amd64 -minikube-start-args=--driver=docker -test.timeout=70m -test.v -timeout-multiplier=3 -binary=./minikube-linux-amd64 2>&1 | tee ./report/testout.txt
R
Rohan Maity 已提交
180
        END_TIME=$(date -u +%s)
181
        TIME_ELAPSED=$(($END_TIME-$START_TIME))
182 183
        min=$((${TIME_ELAPSED}/60))
        sec=$((${TIME_ELAPSED}%60))
M
Medya Gh 已提交
184
        TIME_ELAPSED="${min} min $sec seconds "
185
        echo ::set-env name=TIME_ELAPSED::${TIME_ELAPSED}
186
    - name: Generate HTML Report
187
      shell: bash
188
      run: |
M
Medya Gh 已提交
189
        cd minikube_binaries
190 191
        export PATH=${PATH}:`go env GOPATH`/bin
        go tool test2json -t < ./report/testout.txt > ./report/testout.json || true
M
Medya Gh 已提交
192
        STAT=$(gopogh -in ./report/testout.json -out ./report/testout.html -name "${JOB_NAME} ${GITHUB_REF}" -repo "${GITHUB_REPOSITORY}"  -details "${GITHUB_SHA}")  || true
193
        echo status: ${STAT}
M
Medya Gh 已提交
194
        FailNum=$(echo $STAT | jq '.NumberOfFail')
195
        TestsNum=$(echo $STAT | jq '.NumberOfTests')
M
Medya Gh 已提交
196 197 198
        GOPOGH_RESULT="${JOB_NAME} : completed with ${FailNum} / ${TestsNum} failures in ${TIME_ELAPSED}"
        echo ::set-env name=GOPOGH_RESULT::${GOPOGH_RESULT}
        echo ::set-env name=STAT::${STAT}
199 200
    - uses: actions/upload-artifact@v1
      with:
201
        name: docker_ubuntu_18_04
M
Medya Gh 已提交
202
        path: minikube_binaries/report
M
Medya Gh 已提交
203
    - name: The End Result - Docker On Ubuntu 18:04
M
Medya Gh 已提交
204
      shell: bash
205 206
      run: |
        echo ${GOPOGH_RESULT}
M
Medya Gh 已提交
207 208
        numFail=$(echo $STAT | jq '.NumberOfFail')
        echo "----------------${numFail} Failures----------------------------"
209
        echo $STAT | jq '.FailedTests' || true
M
Medya Gh 已提交
210 211
        echo "-------------------------------------------------------"
        if [ "$numFail" -gt 0 ];then echo "*** $numFail Failed ***";exit 2;fi
212
  none_ubuntu16_04:
M
Medya Gh 已提交
213
    needs: [build_minikube]
R
Rohan Maity 已提交
214
    env:
215 216
      TIME_ELAPSED: time
      JOB_NAME: "None_Ubuntu_16_04"
M
Medya Gh 已提交
217
      GOPOGH_RESULT: ""
M
Medya Gh 已提交
218
      SHELL: "/bin/bash" # To prevent https://github.com/kubernetes/minikube/issues/6643
219
    runs-on: ubuntu-16.04
220
    steps:
M
Medya Gh 已提交
221
    - name: Install gopogh
222
      shell: bash
M
Medya Gh 已提交
223
      run: |
M
Medya Gh 已提交
224
        curl -LO https://github.com/medyagh/gopogh/releases/download/v0.1.16/gopogh-linux-amd64
M
Medya Gh 已提交
225
        sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
226
    - name: Download Binaries
M
Medya Gh 已提交
227 228 229
      uses: actions/download-artifact@v1
      with:
        name: minikube_binaries
230
    - name: Run Integration Test
M
Medya Gh 已提交
231
      continue-on-error: true
232 233
      # bash {0} to allow test to continue to next step. in case of
      shell: bash {0}
M
Medya Gh 已提交
234 235
      run: |
        cd minikube_binaries
236
        mkdir -p report
237
        mkdir -p testhome
M
Medya Gh 已提交
238 239 240
        chmod a+x e2e-*
        chmod a+x minikube-*
        START_TIME=$(date -u +%s)
S
Sharif Elgamal 已提交
241
        KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome sudo -E ./e2e-linux-amd64 -minikube-start-args=--driver=none -test.timeout=70m -test.v -timeout-multiplier=3 -binary=./minikube-linux-amd64 2>&1 | tee ./report/testout.txt
M
Medya Gh 已提交
242
        END_TIME=$(date -u +%s)
243
        TIME_ELAPSED=$(($END_TIME-$START_TIME))
M
Medya Gh 已提交
244 245 246 247
        min=$((${TIME_ELAPSED}/60))
        sec=$((${TIME_ELAPSED}%60))
        TIME_ELAPSED="${min} min $sec seconds "
        echo ::set-env name=TIME_ELAPSED::${TIME_ELAPSED}
248
    - name: Generate HTML Report
249
      shell: bash
M
Medya Gh 已提交
250 251 252 253
      run: |
        cd minikube_binaries
        export PATH=${PATH}:`go env GOPATH`/bin
        go tool test2json -t < ./report/testout.txt > ./report/testout.json || true
M
Medya Gh 已提交
254
        STAT=$(gopogh -in ./report/testout.json -out ./report/testout.html -name "${JOB_NAME} ${GITHUB_REF}" -repo "${GITHUB_REPOSITORY}"  -details "${GITHUB_SHA}")  || true
M
Medya Gh 已提交
255
        echo status: ${STAT}
M
Medya Gh 已提交
256
        FailNum=$(echo $STAT | jq '.NumberOfFail')
257
        TestsNum=$(echo $STAT | jq '.NumberOfTests')
M
Medya Gh 已提交
258 259 260
        GOPOGH_RESULT="${JOB_NAME} : completed with ${FailNum} / ${TestsNum} failures in ${TIME_ELAPSED}"
        echo ::set-env name=GOPOGH_RESULT::${GOPOGH_RESULT}
        echo ::set-env name=STAT::${STAT}
M
Medya Gh 已提交
261 262 263
    - uses: actions/upload-artifact@v1
      with:
        name: none_ubuntu16_04
M
Medya Gh 已提交
264
        path: minikube_binaries/report
M
Medya Gh 已提交
265
    - name: The End Result - None On Ubuntu 16:04
M
Medya Gh 已提交
266
      shell: bash
267 268
      run: |
        echo ${GOPOGH_RESULT}
M
Medya Gh 已提交
269 270
        numFail=$(echo $STAT | jq '.NumberOfFail')
        echo "----------------${numFail} Failures----------------------------"
271
        echo $STAT | jq '.FailedTests' || true
M
Medya Gh 已提交
272 273
        echo "-------------------------------------------------------"
        if [ "$numFail" -gt 0 ];then echo "*** $numFail Failed ***";exit 2;fi
M
Medya Gh 已提交
274 275 276 277 278
  none_ubuntu18_04:
    needs: [build_minikube]
    env:
      TIME_ELAPSED: time
      JOB_NAME: "None_Ubuntu_18_04"
M
Medya Gh 已提交
279
      GOPOGH_RESULT: ""
M
Medya Gh 已提交
280
      SHELL: "/bin/bash" # To prevent https://github.com/kubernetes/minikube/issues/6643
M
Medya Gh 已提交
281 282
    runs-on: ubuntu-18.04
    steps:
M
Medya Gh 已提交
283
    - name: Install gopogh
284
      shell: bash
285
      run: |
M
Medya Gh 已提交
286
        curl -LO https://github.com/medyagh/gopogh/releases/download/v0.1.16/gopogh-linux-amd64
287
        sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
288
    - name: Download Binaries
M
Medya Gh 已提交
289 290 291
      uses: actions/download-artifact@v1
      with:
        name: minikube_binaries
292
    - name: Run Integration Test
M
Medya Gh 已提交
293
      continue-on-error: true
294 295
      # bash {0} to allow test to continue to next step. in case of
      shell: bash {0}
296
      run: |
M
Medya Gh 已提交
297 298 299 300 301
        cd minikube_binaries
        mkdir -p report
        mkdir -p testhome
        chmod a+x e2e-*
        chmod a+x minikube-*
R
Rohan Maity 已提交
302
        START_TIME=$(date -u +%s)
S
Sharif Elgamal 已提交
303
        KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome sudo -E ./e2e-linux-amd64 -minikube-start-args=--driver=none -test.timeout=70m -test.v -timeout-multiplier=3 -binary=./minikube-linux-amd64 2>&1 | tee ./report/testout.txt
R
Rohan Maity 已提交
304
        END_TIME=$(date -u +%s)
305
        TIME_ELAPSED=$(($END_TIME-$START_TIME))
306 307
        min=$((${TIME_ELAPSED}/60))
        sec=$((${TIME_ELAPSED}%60))
M
Medya Gh 已提交
308
        TIME_ELAPSED="${min} min $sec seconds "
309
        echo ::set-env name=TIME_ELAPSED::${TIME_ELAPSED}
310
    - name: Generate HTML Report
311
      shell: bash
312
      run: |
M
Medya Gh 已提交
313
        cd minikube_binaries
314 315
        export PATH=${PATH}:`go env GOPATH`/bin
        go tool test2json -t < ./report/testout.txt > ./report/testout.json || true
M
Medya Gh 已提交
316
        STAT=$(gopogh -in ./report/testout.json -out ./report/testout.html -name "${JOB_NAME} ${GITHUB_REF}" -repo "${GITHUB_REPOSITORY}"  -details "${GITHUB_SHA}")  || true
317
        echo status: ${STAT}
M
Medya Gh 已提交
318
        FailNum=$(echo $STAT | jq '.NumberOfFail')
319
        TestsNum=$(echo $STAT | jq '.NumberOfTests')
M
Medya Gh 已提交
320 321 322
        GOPOGH_RESULT="${JOB_NAME} : completed with ${FailNum} / ${TestsNum} failures in ${TIME_ELAPSED}"
        echo ::set-env name=GOPOGH_RESULT::${GOPOGH_RESULT}
        echo ::set-env name=STAT::${STAT}
323 324
    - uses: actions/upload-artifact@v1
      with:
M
Medya Gh 已提交
325
        name: none_ubuntu18_04
M
Medya Gh 已提交
326
        path: minikube_binaries/report
M
Medya Gh 已提交
327
    - name: The End Result - None on Ubuntu 18:04
M
Medya Gh 已提交
328
      shell: bash
329 330
      run: |
        echo ${GOPOGH_RESULT}
M
Medya Gh 已提交
331 332
        numFail=$(echo $STAT | jq '.NumberOfFail')
        echo "----------------${numFail} Failures----------------------------"
333
        echo $STAT | jq '.FailedTests' || true
M
Medya Gh 已提交
334 335
        echo "-------------------------------------------------------"
        if [ "$numFail" -gt 0 ];then echo "*** $numFail Failed ***";exit 2;fi
M
Medya Ghazizadeh 已提交
336
  podman_ubuntu_18_04:
M
Medya Gh 已提交
337
      needs: [build_minikube]
338 339 340
      env:
        TIME_ELAPSED: time
        JOB_NAME: "Podman_Ubuntu_18_04"
M
Medya Gh 已提交
341
        GOPOGH_RESULT: ""
M
Medya Gh 已提交
342
        SHELL: "/bin/bash" # To prevent https://github.com/kubernetes/minikube/issues/6643
M
Medya Ghazizadeh 已提交
343 344 345
      runs-on: ubuntu-18.04
      steps:
      - name: install podman
346
        shell: bash
M
Medya Ghazizadeh 已提交
347 348 349 350 351 352 353
        run: |
          . /etc/os-release
          sudo sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
          wget -q https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_${VERSION_ID}/Release.key -O- | sudo apt-key add -
          sudo apt-key add - < Release.key || true
          sudo apt-get update -qq
          sudo apt-get -qq -y install podman
354 355
          sudo podman version || true
          sudo podman info || true
M
Medya Gh 已提交
356
      - name: Install gopogh
357
        shell: bash
M
Medya Ghazizadeh 已提交
358
        run: |
M
Medya Gh 已提交
359
          curl -LO https://github.com/medyagh/gopogh/releases/download/v0.1.16/gopogh-linux-amd64
M
Medya Gh 已提交
360
          sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
M
Medya Gh 已提交
361
      - name: Download binaries
M
Medya Gh 已提交
362 363 364
        uses: actions/download-artifact@v1
        with:
          name: minikube_binaries
365
      - name: Run Integration Test
M
Medya Gh 已提交
366
        continue-on-error: true
367 368
        # bash {0} to allow test to continue to next step. in case of
        shell: bash {0}
M
Medya Ghazizadeh 已提交
369
        run: |
M
Medya Gh 已提交
370 371 372 373 374
          cd minikube_binaries
          mkdir -p report
          mkdir -p testhome
          chmod a+x e2e-*
          chmod a+x minikube-*
375
          START_TIME=$(date -u +%s)
S
Sharif Elgamal 已提交
376
          KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome sudo -E ./e2e-linux-amd64 -minikube-start-args=--driver=podman -test.timeout=70m -test.v -timeout-multiplier=3 -binary=./minikube-linux-amd64 2>&1 | tee ./report/testout.txt
377
          END_TIME=$(date -u +%s)
378
          TIME_ELAPSED=$(($END_TIME-$START_TIME))
379 380
          min=$((${TIME_ELAPSED}/60))
          sec=$((${TIME_ELAPSED}%60))
M
Medya Gh 已提交
381
          TIME_ELAPSED="${min} min $sec seconds "
382
          echo ::set-env name=TIME_ELAPSED::${TIME_ELAPSED}
383
      - name: Generate HTML Report
384
        shell: bash
M
Medya Ghazizadeh 已提交
385
        run: |
M
Medya Gh 已提交
386
          cd minikube_binaries
M
Medya Ghazizadeh 已提交
387 388
          export PATH=${PATH}:`go env GOPATH`/bin
          go tool test2json -t < ./report/testout.txt > ./report/testout.json || true
M
Medya Gh 已提交
389
          STAT=$(gopogh -in ./report/testout.json -out ./report/testout.html -name "${JOB_NAME} ${GITHUB_REF}" -repo "${GITHUB_REPOSITORY}"  -details "${GITHUB_SHA}")  || true
390
          echo status: ${STAT}
M
Medya Gh 已提交
391
          FailNum=$(echo $STAT | jq '.NumberOfFail')
392
          TestsNum=$(echo $STAT | jq '.NumberOfTests')
M
Medya Gh 已提交
393 394 395
          GOPOGH_RESULT="${JOB_NAME} : completed with ${FailNum} / ${TestsNum} failures in ${TIME_ELAPSED}"
          echo ::set-env name=GOPOGH_RESULT::${GOPOGH_RESULT}
          echo ::set-env name=STAT::${STAT}
396 397 398 399
      - uses: actions/upload-artifact@v1
        with:
          name: podman_ubuntu_18_04
          path: minikube_binaries/report
M
Medya Gh 已提交
400
      - name: The End Result - Podman On Ubuntu 18:04
M
Medya Gh 已提交
401
        shell: bash
402
        run: |
M
Medya Gh 已提交
403
          echo ${GOPOGH_RESULT}
M
Medya Gh 已提交
404 405
          numFail=$(echo $STAT | jq '.NumberOfFail')
          echo "----------------${numFail} Failures----------------------------"
M
Medya Gh 已提交
406
          echo $STAT | jq '.FailedTests' || true
M
Medya Gh 已提交
407 408
          echo "-------------------------------------------------------"
          if [ "$numFail" -gt 0 ];then echo "*** $numFail Failed ***";exit 2;fi
409
  # After all 4 integration tests finished
M
Medya Gh 已提交
410
  # collect all the reports and upload
411
  upload_all_reports:
M
Medya Gh 已提交
412
    if: always()
M
Medya Gh 已提交
413
    needs: [docker_ubuntu_16_04,docker_ubuntu_18_04,none_ubuntu16_04,none_ubuntu18_04,podman_ubuntu_18_04]
414 415
    runs-on: ubuntu-18.04
    steps:
416
    - name: Download Results docker_ubuntu_16_04
417 418 419
      uses: actions/download-artifact@v1
      with:
        name: docker_ubuntu_16_04
M
Medya Gh 已提交
420 421 422
    - name: cp docker_ubuntu_16_04 to all_report
      continue-on-error: true
      shell: bash {0}
423 424 425
      run: |
        mkdir -p all_reports
        cp -r docker_ubuntu_16_04 ./all_reports/
426
    - name: Download Results docker_ubuntu_18_04
427 428 429
      uses: actions/download-artifact@v1
      with:
        name: docker_ubuntu_18_04
M
Medya Gh 已提交
430 431 432
    - name: cp docker_ubuntu_18_04 to all_report
      continue-on-error: true
      shell: bash {0}
433 434 435
      run: |
        mkdir -p all_reports
        cp -r docker_ubuntu_18_04 ./all_reports/
436
    - name: Download Results none_ubuntu16_04
437 438 439
      uses: actions/download-artifact@v1
      with:
        name: none_ubuntu16_04
M
Medya Gh 已提交
440 441 442
    - name: cp none_ubuntu16_04 to all_report
      continue-on-error: true
      shell: bash {0}
443 444 445
      run: |
        mkdir -p all_reports
        cp -r none_ubuntu16_04 ./all_reports/
446
    - name: Download Results none_ubuntu18_04
M
Medya Gh 已提交
447 448 449
      uses: actions/download-artifact@v1
      with:
        name: none_ubuntu18_04
450
    - name: Copy none_ubuntu18_04 to all_report
M
Medya Gh 已提交
451 452
      continue-on-error: true
      shell: bash {0}
M
Medya Gh 已提交
453 454 455
      run: |
        mkdir -p all_reports
        cp -r none_ubuntu18_04 ./all_reports/
456
    - name: Download Results podman_ubuntu_18_04
457 458 459
      uses: actions/download-artifact@v1
      with:
        name: podman_ubuntu_18_04
460
    - name: Copy podman_ubuntu_18_04 to all_report
M
Medya Gh 已提交
461 462
      continue-on-error: true
      shell: bash {0}
463 464 465 466 467
      run: |
        mkdir -p all_reports
        cp -r podman_ubuntu_18_04 ./all_reports/
    - uses: actions/upload-artifact@v1
      with:
M
syntax  
Medya Gh 已提交
468
        name: all_reports
469
        path: all_reports