1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-08 04:04:22 +02:00
lazygit/.github/workflows/ci.yml

41 lines
1000 B
YAML
Raw Normal View History

2020-03-19 13:17:27 +02:00
name: Continuous Integration
on:
push:
branches:
- master
pull_request:
2020-03-19 13:17:27 +02:00
jobs:
ci:
runs-on: ubuntu-latest
env:
GOFLAGS: -mod=vendor
steps:
2020-03-20 15:27:22 +02:00
- name: Checkout code
2020-03-19 13:17:27 +02:00
uses: actions/checkout@v2
2020-03-20 15:27:22 +02:00
- name: Setup Go
uses: actions/setup-go@v1
with:
go-version: 1.14.x
2020-03-20 15:27:22 +02: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 13:17:27 +02: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 15:39:34 +02:00
exit 1
2020-03-19 13:17:27 +02:00
fi
2020-03-20 15:27:22 +02:00
- name: Test code
2020-03-19 13:17:27 +02:00
run: |
2020-03-19 13:21:23 +02:00
./test.sh
- name: Build binaries
uses: goreleaser/goreleaser-action@v1
with:
args: --skip-publish --snapshot