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:
parent
32f14df60e
commit
ee37e62927
@ -1,5 +1,10 @@
|
|||||||
name: Unit Tests
|
name: CI
|
||||||
on: [push]
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Run-All:
|
Run-All:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -15,5 +20,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
go-version: 1.18
|
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: echo "Running {{ github.repository }} deployment unit tests."
|
||||||
- run: go test ./...
|
- run: go test ./...
|
||||||
Loading…
x
Reference in New Issue
Block a user