Skip to content

Merge pull request #511 from Poorunga/main #1280

Merge pull request #511 from Poorunga/main

Merge pull request #511 from Poorunga/main #1280

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags:
pull_request:
env:
KUBEEDGE_VERSION: v1.8.2
jobs:
verify-and-lint:
runs-on: ubuntu-latest
timeout-minutes: 30
name: Verify vendor, licenses, do lint
env:
GOPATH: /home/runner/work/${{ github.repository }}
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.17.x
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
path: ./src/github.com/${{ github.repository }}
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Install dependences
run: |
sudo apt-get install -y jq
- name: Run verify test
run: make verify
working-directory: ./src/github.com/${{ github.repository }}
- name: Run lint test
run: make lint
working-directory: ./src/github.com/${{ github.repository }}
build:
runs-on: ubuntu-latest
timeout-minutes: 30
name: Build binary
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.17.x
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- run: make
e2e_test:
runs-on: ubuntu-latest
timeout-minutes: 30
name: E2e test
env:
GO111MODULE: on
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.17.x
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.4.0
- name: Install dependences
run: |
command -v ginkgo || go get github.com/onsi/ginkgo/ginkgo
go get sigs.k8s.io/[email protected]
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.19.3/bin/linux/amd64/kubectl && sudo install kubectl /usr/local/bin/kubectl
type keadm || {
curl -LO https://github.com/kubeedge/kubeedge/releases/download/$KUBEEDGE_VERSION/keadm-$KUBEEDGE_VERSION-linux-amd64.tar.gz
tar -C . -xzf keadm-$KUBEEDGE_VERSION-linux-amd64.tar.gz
chmod +x ./keadm-$KUBEEDGE_VERSION-linux-amd64/keadm/keadm
sudo mv ./keadm-$KUBEEDGE_VERSION-linux-amd64/keadm/keadm /usr/local/bin/keadm
}
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- run: make e2e
docker_build:
runs-on: ubuntu-latest
timeout-minutes: 30
name: Docker image build
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.17.x
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- run: make images
docker_cross_build:
runs-on: ubuntu-latest
timeout-minutes: 30
name: Docker cross build images
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.17.x
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- run: make docker-cross-build
check_helm_pkg:
runs-on: ubuntu-latest
name: Check helm package
steps:
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.4.0
- name: Check helm package
run: |
chmod a+x hack/verify-helm-package.sh && hack/verify-helm-package.sh