Skip to content

Commit

Permalink
split CRI test workflow into 3 separate tests
Browse files Browse the repository at this point in the history
Signed-off-by: Shyam Jesal <s.jesalpura@gmail.com>
  • Loading branch information
shyamjesal committed Mar 23, 2021
1 parent 24aee2e commit 025d79f
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 70 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: vHive cri tests
name: minio test

on:
push:
Expand All @@ -18,75 +18,6 @@ env:
GO111MODULE: on

jobs:
cri-tests:
name: CRI tests
runs-on: [self-hosted, cri]

steps:
- name: Setup TMPDIR
run: mkdir -p $HOME/tmp

- name: Set up Go 1.15
env:
GOROOT: $HOME/go
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
uses: actions/setup-go@v2
with:
go-version: 1.15

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Setup firecracker-containerd
run: ./scripts/setup_firecracker_containerd.sh

- name: Build
env:
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
run: go build

- name: Run vHive CRI tests
env:
TMPDIR: /root/tmp/
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
run: make test-cri

- name: Cleaning
if: ${{ always() }}
run: ./scripts/github_runner/clean_cri_runner.sh

stock-containerd-test:
name: Stock Containerd test
runs-on: [self-hosted, cri]

steps:
- name: Setup TMPDIR
run: mkdir -p $HOME/tmp

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Start Containerd
run: sudo containerd &

- name: Create k8s cluster
run: ./scripts/cluster/create_one_node_cluster.sh stock-only && sleep 2m

- name: Deploy zipkin
env:
KUBECONFIG: /etc/kubernetes/admin.conf
run: ./scripts/setup_zipkin.sh && sleep 5s

- name: Create helloworld container
run: KUBECONFIG=/etc/kubernetes/admin.conf kn service create helloworld-go --image gcr.io/knative-samples/helloworld-go --env TARGET="vHive CRI test"

- name: Cleaning
if: ${{ always() }}
run: ./scripts/github_runner/clean_cri_runner.sh stock-only

minio-test:
name: Minio test
runs-on: [self-hosted, cri]
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/cri_stock_containerd_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: stock containerd tests

on:
push:
branches: [ master ]
paths-ignore:
- 'docs/**'
- '**.md'
pull_request:
branches: [ master ]
paths-ignore:
- 'docs/**'
- '**.md'
workflow_dispatch:

env:
GOOS: linux
GO111MODULE: on

jobs:
stock-containerd-test:
name: Stock Containerd test
runs-on: [self-hosted, cri]

steps:
- name: Setup TMPDIR
run: mkdir -p $HOME/tmp

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Start Containerd
run: sudo containerd &

- name: Create k8s cluster
run: ./scripts/cluster/create_one_node_cluster.sh stock-only && sleep 2m

- name: Deploy zipkin
env:
KUBECONFIG: /etc/kubernetes/admin.conf
run: ./scripts/setup_zipkin.sh && sleep 5s

- name: Create helloworld container
run: KUBECONFIG=/etc/kubernetes/admin.conf kn service create helloworld-go --image gcr.io/knative-samples/helloworld-go --env TARGET="vHive CRI test"

- name: Cleaning
if: ${{ always() }}
run: ./scripts/github_runner/clean_cri_runner.sh stock-only
59 changes: 59 additions & 0 deletions .github/workflows/cri_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: vHive cri test

on:
push:
branches: [ master ]
paths-ignore:
- 'docs/**'
- '**.md'
pull_request:
branches: [ master ]
paths-ignore:
- 'docs/**'
- '**.md'
workflow_dispatch:

env:
GOOS: linux
GO111MODULE: on

jobs:
cri-tests:
name: CRI tests
runs-on: [self-hosted, cri]

steps:
- name: Setup TMPDIR
run: mkdir -p $HOME/tmp

- name: Set up Go 1.15
env:
GOROOT: $HOME/go
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
uses: actions/setup-go@v2
with:
go-version: 1.15

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Setup firecracker-containerd
run: ./scripts/setup_firecracker_containerd.sh

- name: Build
env:
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
run: go build

- name: Run vHive CRI tests
env:
TMPDIR: /root/tmp/
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
run: make test-cri

- name: Cleaning
if: ${{ always() }}
run: ./scripts/github_runner/clean_cri_runner.sh

0 comments on commit 025d79f

Please sign in to comment.