Skip to content

Merge branch 'main' into supportgraph #2

Merge branch 'main' into supportgraph

Merge branch 'main' into supportgraph #2

Workflow file for this run

name: CI
on:
push:
pull_request:
jobs:
golangci:
name: Lint with golangci-lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- uses: golangci/golangci-lint-action@v3
with:
version: v1.53.3
vertify:
name: Vertify import alias, vendor, codegen, crds
runs-on: ubuntu-latest
env:
GOPATH: ${{ github.workspace }}
WORKSPACE: ${{ github.workspace }}/src/github.com/clusterpedia-io/clusterpedia
defaults:
run:
working-directory: ${{ env.WORKSPACE }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
path: ${{ env.WORKSPACE }}
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- run: hack/verify-import-aliases.sh
- run: hack/verify-vendor.sh
- run: hack/verify-codegen.sh
- run: hack/verify-crds.sh
build:
name: Build
needs: vertify
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# https://github.com/actions/checkout#fetch-all-history-for-all-tags-and-branches
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Compile
run: make all
test:
name: Unit test
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- run: make test
e2e-test:
name: E2e test
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# https://github.com/actions/checkout#fetch-all-history-for-all-tags-and-branches
fetch-depth: 0
- name: Run e2e test
run: ./test/test.sh
- name: Upload logs
uses: actions/upload-artifact@v3
if: failure()
with:
name: e2e-logs-${{ github.run_id }}
path: ${{ github.workspace }}/test/logs-*