-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: migrate to GitHub Actions (#184)
- Loading branch information
Showing
8 changed files
with
95 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: daily |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Release | ||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
env: | ||
GO_VERSION: "1.17" | ||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get -y update | ||
sudo apt-get -y install rpm | ||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Release | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
version: v1.0.0 | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Test | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- '*.md' | ||
- 'doc/**' | ||
- 'LICENSE' | ||
pull_request: | ||
env: | ||
GO_VERSION: "1.17" | ||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
|
||
- name: Run unit tests | ||
run: make test |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,17 @@ | ||
.PHONY: \ | ||
all \ | ||
dep \ | ||
depup \ | ||
update \ | ||
build \ | ||
install \ | ||
lint \ | ||
vet \ | ||
fmt \ | ||
fmtcheck \ | ||
clean \ | ||
pretest \ | ||
test | ||
|
||
VERSION := $(shell git describe --tags --abbrev=0) | ||
SRCS = $(shell git ls-files '*.go') | ||
PKGS = $(shell go list ./... | grep -v /vendor/) | ||
|
||
all: dep build test | ||
|
||
dep: | ||
go get -u github.com/golang/dep/... | ||
dep ensure -vendor-only | ||
|
||
depup: | ||
go get -u github.com/golang/dep/... | ||
dep ensure -u | ||
go mod download | ||
|
||
build: main.go dep | ||
build: main.go | ||
go build -o pet $< | ||
|
||
install: main.go dep | ||
go install | ||
|
||
lint: | ||
@ go get -v github.com/golang/lint/golint | ||
$(foreach file,$(SRCS),golint $(file) || exit;) | ||
test: | ||
go test ./... | ||
|
||
vet: | ||
go vet $(PKGS) || exit; | ||
|
||
fmt: | ||
gofmt -w $(SRCS) | ||
|
||
fmtcheck: | ||
@ $(foreach file,$(SRCS),gofmt -s -l $(file);) | ||
|
||
clean: | ||
go clean $(shell glide nv) | ||
|
||
pretest: vet fmtcheck | ||
|
||
test: pretest | ||
go install | ||
@ $(foreach pkg,$(PKGS), go test $(pkg) || exit;) | ||
go vet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,36 @@ | ||
module github.com/knqyf263/pet | ||
|
||
go 1.17 | ||
|
||
require ( | ||
github.com/BurntSushi/toml v0.3.0 | ||
github.com/briandowns/spinner v0.0.0-20170614154858-48dbb65d7bd5 | ||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e | ||
github.com/fatih/color v1.7.0 | ||
github.com/golang/protobuf v1.1.0 // indirect | ||
github.com/google/go-github v15.0.0+incompatible | ||
github.com/google/go-querystring v0.0.0-20170111101155-53e6ce116135 // indirect | ||
github.com/inconshreveable/mousetrap v1.0.0 // indirect | ||
github.com/jroimartin/gocui v0.4.0 | ||
github.com/mattn/go-colorable v0.0.9 // indirect | ||
github.com/mattn/go-isatty v0.0.3 // indirect | ||
github.com/mattn/go-runewidth v0.0.2 | ||
github.com/nsf/termbox-go v0.0.0-20180509163535-21a4d435a862 // indirect | ||
github.com/pkg/errors v0.8.0 | ||
github.com/spf13/cobra v0.0.3 | ||
github.com/spf13/pflag v1.0.1 // indirect | ||
github.com/xanzy/go-gitlab v0.10.5 | ||
golang.org/x/crypto v0.0.0-20180608092829-8ac0e0d97ce4 | ||
golang.org/x/net v0.0.0-20180530234432-1e491301e022 // indirect | ||
golang.org/x/oauth2 v0.0.0-20180603041954-1e0a3fa8ba9a | ||
gopkg.in/alessio/shellescape.v1 v1.0.0-20170105083845-52074bc9df61 | ||
) | ||
|
||
require ( | ||
github.com/alessio/shellescape v1.4.1 // indirect | ||
github.com/chzyer/logex v1.1.10 // indirect | ||
github.com/chzyer/test v0.0.0-20210722231415-061457976a23 // indirect | ||
github.com/golang/protobuf v1.1.0 // indirect | ||
github.com/google/go-querystring v0.0.0-20170111101155-53e6ce116135 // indirect | ||
github.com/inconshreveable/mousetrap v1.0.0 // indirect | ||
github.com/mattn/go-colorable v0.0.9 // indirect | ||
github.com/mattn/go-isatty v0.0.3 // indirect | ||
github.com/nsf/termbox-go v0.0.0-20180509163535-21a4d435a862 // indirect | ||
github.com/spf13/pflag v1.0.1 // indirect | ||
golang.org/x/net v0.0.0-20180530234432-1e491301e022 // indirect | ||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect | ||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037 // indirect | ||
google.golang.org/appengine v1.0.0 // indirect | ||
gopkg.in/alessio/shellescape.v1 v1.0.0-20170105083845-52074bc9df61 // indirect | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters