Skip to content

ci: add ci.yaml

ci: add ci.yaml #6

Workflow file for this run

name: CI
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
GO_VERSION: '1.18.5'
jobs:
golang-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Set up Golang
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
- name: Run go fmt test
run: chmod +x hack/verify-gofmt.sh && hack/verify-gofmt.sh
env:
GO111MODULE: auto
- name: Run unit test
run: go test -v ./pkg/controller
- name: Build the project
run: go build -v ./...