Vaibhav Kamra ee37e62927
Add gofmt to ci steps (#16)
This commit has the following changes:

- Rename unitTests.yml to ci.yml
- Add a step to run gofmt
2022-05-09 10:47:43 -07:00

28 lines
559 B
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
Run-All:
runs-on: ubuntu-latest
defaults:
run:
working-directory: src
steps:
- name: Repo Code Checkout
uses: actions/checkout@v3
- name: Golang Setup
uses: actions/setup-go@v3
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 ./...