-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from nao1215/first-pr
First Pull Request
- Loading branch information
Showing
31 changed files
with
1,647 additions
and
2 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,25 @@ | ||
{ | ||
"projectName": "csv", | ||
"projectOwner": "nao1215", | ||
"repoType": "github", | ||
"repoHost": "https://github.com", | ||
"files": [ | ||
"README.md" | ||
], | ||
"imageSize": 75, | ||
"commit": true, | ||
"commitConvention": "angular", | ||
"contributors": [ | ||
{ | ||
"login": "nao1215", | ||
"name": "CHIKAMATSU Naohiro", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/22737008?v=4", | ||
"profile": "https://debimate.jp/", | ||
"contributions": [ | ||
"doc" | ||
] | ||
} | ||
], | ||
"contributorsPerLine": 7, | ||
"linkToUsage": true | ||
} |
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 @@ | ||
github: nao1215 |
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,28 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: "[BUG] " | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Desktop (please complete the following information):** | ||
- Go Version [e.g. 1.17] | ||
- Library Version [e.g. 1.0.1] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
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,17 @@ | ||
--- | ||
name: Task | ||
about: Describe this issue | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
## What | ||
|
||
Describe what this issue should address. | ||
|
||
## How | ||
|
||
Describe how to address the issue. | ||
|
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,13 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: gomod | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
time: "20:00" | ||
open-pull-requests-limit: 10 | ||
# Maintain dependencies for GitHub Actions | ||
- 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: Coverage | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
unit_test: | ||
name: Unit test (linux) | ||
|
||
strategy: | ||
matrix: | ||
platform: [ubuntu-latest] | ||
|
||
runs-on: ${{ matrix.platform }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1" | ||
check-latest: true | ||
|
||
- name: Run tests with coverage report output | ||
run: go test -cover -coverpkg=./... -coverprofile=coverage.out ./... | ||
|
||
- uses: k1LoW/octocov-action@v1 |
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,36 @@ | ||
name: MultiPlatformUnitTest | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
unit_test: | ||
name: Unit test (linux) | ||
|
||
strategy: | ||
matrix: | ||
os: | ||
- "ubuntu-latest" | ||
- "windows-latest" | ||
- "macos-latest" | ||
go: | ||
- "1" | ||
- "1.22" | ||
- "1.21" | ||
- "1.20" | ||
fail-fast: false | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
|
||
- name: Run tests with coverage report output | ||
run: go test -cover -coverpkg=./... -coverprofile=coverage.out ./... |
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,41 @@ | ||
name: reviewdog | ||
on: [pull_request] | ||
|
||
jobs: | ||
golangci-lint: | ||
name: golangci-lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- name: golangci-lint | ||
uses: reviewdog/action-golangci-lint@v2 | ||
with: | ||
reporter: github-pr-review | ||
level: warning | ||
|
||
misspell: | ||
name: misspell | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- name: misspell | ||
uses: reviewdog/action-misspell@v1 | ||
with: | ||
reporter: github-pr-review | ||
level: warning | ||
locale: "US" | ||
|
||
actionlint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: reviewdog/action-actionlint@v1 | ||
with: | ||
reporter: github-pr-review | ||
level: warning |
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 |
---|---|---|
|
@@ -19,3 +19,4 @@ | |
|
||
# Go workspace file | ||
go.work | ||
coverage.* |
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,48 @@ | ||
run: | ||
go: "1.21" | ||
|
||
issues: | ||
exclude-use-default: false | ||
|
||
linters: | ||
disable-all: true | ||
enable: | ||
- errcheck | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- staticcheck | ||
- typecheck | ||
- unused | ||
- asciicheck | ||
- bodyclose | ||
- dogsled | ||
- durationcheck | ||
- errorlint | ||
- exhaustive | ||
- exportloopref | ||
- forcetypeassert | ||
- gochecknoinits | ||
- goconst | ||
- gocritic | ||
- goimports | ||
- gosec | ||
- misspell | ||
- nakedret | ||
- noctx | ||
- prealloc | ||
- rowserrcheck | ||
- sqlclosecheck | ||
- stylecheck | ||
- tagliatelle | ||
- thelper | ||
- unconvert | ||
- unparam | ||
- wastedassign | ||
- whitespace | ||
linters-settings: | ||
tagliatelle: | ||
case: | ||
use-field-name: true | ||
rules: | ||
json: snake |
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,20 @@ | ||
# generated by octocov init | ||
coverage: | ||
if: true | ||
acceptable: 80% | ||
badge: | ||
path: docs/coverage.svg | ||
diff: | ||
datastores: | ||
- artifact://${GITHUB_REPOSITORY} | ||
comment: | ||
if: is_pull_request | ||
summary: | ||
if: true | ||
report: | ||
if: is_default_branch | ||
datastores: | ||
- artifact://${GITHUB_REPOSITORY} | ||
codeToTestRatio: | ||
badge: | ||
path: docs/ratio.svg |
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 @@ | ||
Please approach others with respect. That is everything. |
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,32 @@ | ||
.PHONY: build test clean help tools changelog | ||
|
||
APP = csv | ||
VERSION = $(shell git describe --tags --abbrev=0) | ||
GIT_REVISION := $(shell git rev-parse HEAD) | ||
GO = go | ||
GO_BUILD = $(GO) build | ||
GO_TEST = $(GO) test -v | ||
GO_TOOL = $(GO) tool | ||
GOOS = "" | ||
GOARCH = "" | ||
GO_PKGROOT = ./... | ||
GO_PACKAGES = $(shell $(GO_LIST) $(GO_PKGROOT)) | ||
GO_LDFLAGS = | ||
|
||
clean: ## Clean project | ||
-rm -rf $(APP) coverage.out coverage.html | ||
|
||
test: ## Start unit test for server | ||
env GOOS=$(GOOS) $(GO_TEST) -cover -coverpkg=$(GO_PKGROOT) -coverprofile=coverage.out $(GO_PKGROOT) | ||
$(GO_TOOL) cover -html=coverage.out -o coverage.html | ||
|
||
.DEFAULT_GOAL := help | ||
help: ## Show help message | ||
@grep -E '^[0-9a-zA-Z_-]+[[:blank:]]*:.*?## .*$$' $(MAKEFILE_LIST) | sort \ | ||
| awk 'BEGIN {FS = ":.*?## "}; {printf "\033[1;32m%-15s\033[0m %s\n", $$1, $$2}' | ||
|
||
changelog: ## Generate changelog | ||
ghch --format markdown > CHANGELOG.md | ||
|
||
tools: ## Install dependency tools | ||
$(GO_INSTALL) github.com/Songmu/ghch/cmd/ghch@latest |
Oops, something went wrong.