Skip to content

chore: add project automation #32

chore: add project automation

chore: add project automation #32

Workflow file for this run

name: ci
on:
push:
branches: [main]
pull_request:
jobs:
fmt:
name: Format and generate files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache-dependency-path: 'go.sum'
- name: Generated files
run: |
make fmt generate crds manifests
git diff --exit-code --numstat
lint:
name: Code Quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache-dependency-path: 'go.sum'
- uses: golangci/golangci-lint-action@v4
with:
version: 'v1.55.2'
test:
name: Test
runs-on: ubuntu-latest
needs: [fmt,lint]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache-dependency-path: 'go.sum'
- name: Build
run: make test
build:
name: Build
runs-on: ubuntu-latest
needs: [test]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache-dependency-path: 'go.sum'
- name: Build
run: make build