Skip to content

Commit

Permalink
✨ intialize
Browse files Browse the repository at this point in the history
  • Loading branch information
budougumi0617 committed Jan 2, 2021
0 parents commit a7a0004
Show file tree
Hide file tree
Showing 6 changed files with 130 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: reviewdog
on: [pull_request]
jobs:
golangci-lint:
name: runner / golangci-lint
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: golangci-lint
uses: reviewdog/action-golangci-lint@v1
# uses: docker://reviewdog/action-golangci-lint:v1 # pre-build docker image
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
golangci_lint_flags: "--config=.golangci.yml ./..."
35 changes: 35 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
on:
push:
branches:
- master
pull_request:
name: test
jobs:
test:
strategy:
matrix:
platform: [ubuntu-latest]
env:
PIXELA_USER: ${{ secrets.PIXELA_USER }}
PIXELA_TOKEN: ${{ secrets.PIXELA_TOKEN }}
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
if: success()
uses: actions/setup-go@v2
with:
go-version: '^1.15' # The Go version to download (if necessary) and use.
- name: Checkout code
uses: actions/checkout@v2
- name: Use Cache
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download Modules
if: steps.cache.outputs.cache-hit != 'true'
run: go mod download
- name: Run tests
run: go test -v -covermode=atomic
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
### https://raw.github.com/github/gitignore/218a941be92679ce67d0484547e3e142b2f5f6f0/Go.gitignore

# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
# vendor/


49 changes: 49 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
linters-settings:
govet:
check-shadowing: false
golint:
min-confidence: 0
gocyclo:
min-complexity: 30
maligned:
suggest-new: true
misspell:
locale: US
ignore-words:
- cancelled
- Cancelled

linters:
disable-all: true
enable:
- goimports
- bodyclose
- deadcode
- errcheck
- gochecknoinits
- gocognit
- gocritic
- gocyclo
- gofmt
- golint
- govet
- ineffassign
- interfacer
- maligned
- misspell
- nakedret
- prealloc
- staticcheck
- structcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- varcheck
- whitespace

issues:
exclude-rules:
- linters:
- staticcheck
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
nrseg
===
[![Go Reference](https://pkg.go.dev/badge/github.com/budougumi0617/nrseg.svg)](https://pkg.go.dev/github.com/budougumi0617/nrseg)
[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](LICENSE)
![test](https://github.com/budougumi0617/nrseg/workflows/test/badge.svg)
![reviewdog](https://github.com/budougumi0617/nrseg/workflows/reviewdog/badge.svg)



3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/budougumi0617/nrseg

go 1.15

0 comments on commit a7a0004

Please sign in to comment.