From fbfa48f0fcd2b537c98daa79352a0e224a480937 Mon Sep 17 00:00:00 2001 From: Anthony HAMON Date: Sat, 18 Aug 2018 09:27:47 +0200 Subject: update circleci * define release worflow when a tag is created * add dep install * run tests with coverage * add goreleaser --- .circleci/config.yml | 49 +++++++++++++++++++++++++++++++++---------------- .gitignore | 3 ++- test.sh | 14 ++++++++++++++ 3 files changed, 49 insertions(+), 17 deletions(-) create mode 100755 test.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index c5f520b70..939adc60e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,26 +1,43 @@ -# Golang CircleCI 2.0 configuration file -# -# Check https://circleci.com/docs/2.0/language-go/ for more details version: 2 jobs: build: docker: - # specify the version - - image: circleci/golang:1.9 + - image: circleci/golang:1.10 - # Specify service dependencies here if necessary - # CircleCI maintains a library of pre-built images - # documented at https://circleci.com/docs/2.0/circleci-images/ - # - image: circleci/postgres:9.4 + working_directory: /go/src/github.com/jesseduffield/lazygit + steps: + - checkout + - run: + name: Run tests + command: | + ./test.sh + - run: + name: Push on codecov result + command: | + bash <(curl -s https://codecov.io/bash) - #### TEMPLATE_NOTE: go expects specific checkout path representing url - #### expecting it in the form of - #### /go/src/github.com/circleci/go-tool - #### /go/src/bitbucket.org/circleci/go-tool + release: + docker: + - image: circleci/golang:1.10 working_directory: /go/src/github.com/jesseduffield/lazygit steps: - checkout + - run: + name: Run gorelease + command: | + curl -sL https://git.io/goreleaser | bash - # specify any bash command here prefixed with `run: ` - - run: go test -v ./... - - run: bash <(curl -s https://codecov.io/bash) +workflows: + version: 2 + build: + jobs: + - build + release: + jobs: + - release: + context: org-global + filters: + tags: + only: /v[0-9]+(\.[0-9]+)*/ + branches: + ignore: /.*/ diff --git a/.gitignore b/.gitignore index 304a2356f..f759e8a06 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ TODO.md # Tests test/repos/repo +coverage.txt # Binaries -lazygit \ No newline at end of file +lazygit diff --git a/test.sh b/test.sh new file mode 100755 index 000000000..a92243cf7 --- /dev/null +++ b/test.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +set -e +echo "" > coverage.txt + +for d in $( find ./* -maxdepth 10 ! -path "./vendor*" ! -path "./.git*" -type d); do + if ls $d/*.go &> /dev/null; then + go test -v -race -coverprofile=profile.out -covermode=atomic $d + if [ -f profile.out ]; then + cat profile.out >> coverage.txt + rm profile.out + fi + fi +done -- cgit v1.2.3 From bbf7a9d790a114b2a1de0b1b0992a72049ecd2f3 Mon Sep 17 00:00:00 2001 From: Anthony HAMON Date: Sat, 18 Aug 2018 09:30:26 +0200 Subject: add various badges * golangci (https://golangci.com) * circleci (https://circleci.com/) * codecov.io (https://codecov.io) * godoc * tag release --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6b85ffbe1..28fe9c399 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# lazygit [![Go Report Card](https://goreportcard.com/badge/github.com/jesseduffield/lazygit)](https://goreportcard.com/report/github.com/jesseduffield/lazygit) +# lazygit [![CircleCI](https://circleci.com/gh/jesseduffield/lazygit.svg?style=svg)](https://circleci.com/gh/jesseduffield/lazygit) [![codecov](https://codecov.io/gh/jesseduffield/lazygit/branch/master/graph/badge.svg)](https://codecov.io/gh/jesseduffield/lazygit) [![Go Report Card](https://goreportcard.com/badge/github.com/jesseduffield/lazygit)](https://goreportcard.com/report/github.com/jesseduffield/lazygit) [![GolangCI](https://golangci.com/badges/github.com/jesseduffield/lazygit.svg)](https://golangci.com) [![GoDoc](https://godoc.org/github.com/jesseduffield/lazygit?status.svg)](http://godoc.org/github.com/jesseduffield/lazygit) [![GitHub tag](https://img.shields.io/github/tag/jesseduffield/lazygit.svg)]() A simple terminal UI for git commands, written in Go with the [gocui](https://github.com/jroimartin/gocui "gocui") library. -- cgit v1.2.3 From bb86a3ff7c0b0436e06f5b84cf5abf3a707cf22d Mon Sep 17 00:00:00 2001 From: Anthony HAMON Date: Sun, 19 Aug 2018 10:43:45 +0200 Subject: update github template --- .github/ISSUE_TEMPLATE/bug_report.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 1a96635a3..b10cb5f37 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -23,6 +23,7 @@ If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - OS: [e.g. Windows] - Lazygit Version [e.g. v0.1.45] + - The last commit id if you built project from sources (run : ```git-rev parse HEAD```) **Additional context** Add any other context about the problem here. -- cgit v1.2.3