Files
k8sgpt/.github/workflows/test.yaml
Peter Pan e66de8c4ce chore: gofmt fix and enable in CI (#414)
* 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>
2023-05-15 06:53:59 +01:00

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