Add gofmt to ci steps (#16)

This commit has the following changes:

- Rename unitTests.yml to ci.yml
- Add a step to run gofmt
This commit is contained in:
Vaibhav Kamra 2022-05-09 10:47:43 -07:00 committed by GitHub
parent 32f14df60e
commit ee37e62927
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,10 @@
name: Unit Tests
on: [push]
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
Run-All:
runs-on: ubuntu-latest
@ -15,5 +20,8 @@ jobs:
with:
go-version: 1.18
- name: Run gofmt
run: if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi
- run: echo "Running {{ github.repository }} deployment unit tests."
- run: go test ./...