Skip to content

Fix ci e2e running failed issue. #1581

Fix ci e2e running failed issue.

Fix ci e2e running failed issue. #1581

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags:
pull_request:
jobs:
verify-and-lint:
runs-on: ubuntu-20.04
name: Verify codegen/vendor/licenses, do lint
env:
GOPATH: ${{ github.workspace }}
# since client-go codegen requires that code checkout GOPATH
CODE_DIR: '${{github.workspace}}/src/github.com/kubeedge/sedna'
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.16.x
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
path: ${{ env.CODE_DIR }}
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Install dependences
run: |
sudo apt-get install -y jq pycodestyle
- name: Run verify test
run: make verify
working-directory: ${{ env.CODE_DIR }}
- name: Run go lint test
run: make lint
working-directory: ${{ env.CODE_DIR }}
- name: Run python code style test
run: pycodestyle lib
working-directory: ${{ env.CODE_DIR }}
build:
runs-on: ubuntu-20.04
name: build gm and lc
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.16.x
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- run: make build # without verify
basic_test:
runs-on: ubuntu-20.04
name: 'Unit test, integration test edge (noop now)'
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.16.x
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Install dependences
run: ': to be added'
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- run: ': to be added'
e2e_test:
runs-on: ubuntu-20.04
name: 'E2e test'
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.16.x
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Install dependences
run: |
# since this ubuntu-20.04 os has already kind/kubectl/jq(see https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2004-Readme.md),
# this just makes it sure
sudo apt-get install -y jq
go get sigs.k8s.io/kind@$(curl -s https://api.github.com/repos/kubernetes-sigs/kind/releases/97518847 | jq -r .tag_name)
type kubectl || {
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
}
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- run: make e2e
docker_build:
runs-on: ubuntu-20.04
name: docker image build for gm/lc
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.16.x
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- run: make images
docker_cross_build:
runs-on: ubuntu-20.04
name: docker cross build images for gm/lc/kb
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.16.x
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- run: make docker-cross-build