Skip to content

Commit 01bbe60

Browse files
authored
add github-actions settings (#52)
* add actions settings * skip lint * lint with golang cli * use config * delete .travis.yml * rm space * rm unnecessary sprintf Co-authored-by: akita714 <akita714@preferred.jp>
1 parent 2a4df4e commit 01bbe60

File tree

3 files changed

+37
-25
lines changed

3 files changed

+37
-25
lines changed

.github/workflows/ci.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
tags-ignore: [ "**" ]
7+
paths-ignore: [ "**.md"]
8+
pull_request:
9+
types: [opened, synchronize]
10+
paths-ignore: [ "**.md" ]
11+
12+
jobs:
13+
test:
14+
name: Test
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Set up Go
18+
uses: actions/setup-go@v2
19+
with:
20+
go-version: ~1.12
21+
- name: Check out
22+
uses: actions/checkout@v2
23+
with:
24+
fetch-depth: 0
25+
- name: Get dependencies
26+
run: go mod download
27+
- name: golangci-lint
28+
uses: golangci/golangci-lint-action@v3
29+
with:
30+
version: v1.29
31+
args: --config golangci.yml
32+
- name: Build
33+
run: make install e2e
34+
- name: Test
35+
run: make test coverage

.travis.yml

-22
This file was deleted.

pkg/ghost/types/branchspec.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
package types
1616

1717
import (
18-
"fmt"
1918
"io/ioutil"
2019
"os"
2120
"path/filepath"
@@ -150,7 +149,7 @@ func (bs CommitsBranchSpec) CreateBranch(we WorkingEnv) (GhostBranch, errors.Git
150149
if ggerr != nil {
151150
return nil, ggerr
152151
}
153-
ggerr = git.CommitFile(dstDir, branch.FileName(), fmt.Sprintf("Create ghost commit"))
152+
ggerr = git.CommitFile(dstDir, branch.FileName(), "Create ghost commit")
154153
if ggerr != nil {
155154
return nil, ggerr
156155
}
@@ -263,7 +262,7 @@ func (bs DiffBranchSpec) CreateBranch(we WorkingEnv) (GhostBranch, errors.GitGho
263262
if err != nil {
264263
return nil, errors.WithStack(err)
265264
}
266-
err = git.CommitFile(dstDir, branch.FileName(), fmt.Sprintf("Create ghost commit"))
265+
err = git.CommitFile(dstDir, branch.FileName(), "Create ghost commit")
267266
if err != nil {
268267
return nil, errors.WithStack(err)
269268
}

0 commit comments

Comments
 (0)