mirror of
https://github.com/k8sgpt-ai/k8sgpt.git
synced 2026-01-24 14:14:21 +00:00
* gofmt the files Signed-off-by: Peter Pan <Peter.Pan@daocloud.io> * add UT and goFMT to PR Gate (Github Action for PR) Signed-off-by: Peter Pan <Peter.Pan@daocloud.io> --------- Signed-off-by: Peter Pan <Peter.Pan@daocloud.io> Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
32 lines
570 B
YAML
32 lines
570 B
YAML
name: Run tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
env:
|
|
GO_VERSION: "~1.20"
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4
|
|
with:
|
|
go-version: ${{ env.GO_VERSION }}
|
|
|
|
- name: Unit Test
|
|
run: make test
|
|
|
|
- name: Fmt Test
|
|
run: fmtFiles=$(make fmt); if [ "$fmtFiles" != "" ];then exit 1; fi
|
|
|