1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-24 05:36:19 +02:00

37 lines
952 B
YAML
Raw Normal View History

2020-03-19 12:17:27 +01:00
name: Continuous Integration
on: push
jobs:
ci:
runs-on: ubuntu-latest
env:
GOFLAGS: -mod=vendor
steps:
2020-03-20 14:27:22 +01:00
- name: Checkout code
2020-03-19 12:17:27 +01:00
uses: actions/checkout@v2
2020-03-20 14:27:22 +01:00
- name: Setup Go
uses: actions/setup-go@v1
with:
go-version: 1.14.x
2020-03-20 14:27:22 +01:00
- name: Cache build
uses: actions/cache@v1
with:
path: ~/.cache/go-build
key: ${{runner.os}}-go-${{hashFiles('**/go.sum')}}
restore-keys: |
${{runner.os}}-go-
- name: Format code
2020-03-19 12:17:27 +01:00
run: |
if [ $(find . ! -path "./vendor/*" -name "*.go" -exec gofmt -s -d {} \;|wc -l) -gt 0 ]; then
find . ! -path "./vendor/*" -name "*.go" -exec gofmt -s -d {} \;
2020-03-20 14:39:34 +01:00
exit 1
2020-03-19 12:17:27 +01:00
fi
2020-03-20 14:27:22 +01:00
- name: Test code
2020-03-19 12:17:27 +01:00
run: |
2020-03-19 12:21:23 +01:00
./test.sh
- name: Build binaries
uses: goreleaser/goreleaser-action@v1
with:
args: --skip-publish --snapshot