update go mod version to 1.19 #455
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
pull_request: | |
env: | |
KUBEEDGE_VERSION: v1.10.3 | |
GINKGO_VERSION: "v2.9.5" | |
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.19.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.19.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.19.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 install github.com/onsi/ginkgo/v2/ginkgo@${{ env.GINKGO_VERSION }} | |
go install sigs.k8s.io/[email protected] | |
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.27.7/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.19.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.19.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 |