Skip to content

Commit

Permalink
Merge pull request #1 from nao1215/feat/first-commit
Browse files Browse the repository at this point in the history
Introduce project template files
  • Loading branch information
nao1215 authored Dec 23, 2023
2 parents 77bdf97 + 8138483 commit 200e770
Show file tree
Hide file tree
Showing 30 changed files with 537 additions and 2 deletions.
25 changes: 25 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"projectName": "rainbow",
"projectOwner": "nao1215",
"repoType": "github",
"repoHost": "https://github.com",
"files": [
"README.md"
],
"imageSize": 80,
"commit": true,
"commitConvention": "none",
"contributors": [
{
"login": "nao1215",
"name": "CHIKAMATSU Naohiro",
"avatar_url": "https://avatars.githubusercontent.com/u/22737008?v=4",
"profile": "https://debimate.jp/",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
"linkToUsage": false
}
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: nao1215

21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG Report] XXX"
labels: bug
assignees: ''

---

## About the problem
A clear description of the bug encountered.

## Expected behavior
Expected behavior.

## Steps to reproduce
Steps to reproduce the bug.

## Environment
- OS: [e.g. Windows 10]
- Command Name & Version: [e.g. s3hub 0.1.0]
18 changes: 18 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: 2
updates:
- package-ecosystem: gomod
directory: "/"
schedule:
interval: daily
time: "20:00"
groups:
aws-sdk:
patterns:
- github.com/aws/aws-sdk-go-v2
- github.com/aws/aws-sdk-go-v2/*
open-pull-requests-limit: 10

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
21 changes: 21 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: "go.mod"

- name: Build
run: make build
13 changes: 13 additions & 0 deletions .github/workflows/gitleak.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: gitleaks
on: [pull_request]
jobs:
scan:
name: gitleaks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34 changes: 34 additions & 0 deletions .github/workflows/linux_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: LinuxUnitTest

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@v4
with:
go-version: "1"
check-latest: true

- name: Download dependencies
run: go mod download

- uses: nao1215/actions-hottest@v1
with:
args: '-cover -coverpkg=./... -coverprofile=coverage.out ./...'
- uses: k1LoW/octocov-action@v0
31 changes: 31 additions & 0 deletions .github/workflows/mac_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: MacUnitTest

on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
unit_test:
name: Unit test (mac)

strategy:
matrix:
platform: [macos-latest]

runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v4
with:
go-version: "1"
check-latest: true

- name: Run unit test
run: |
go mod download
go test -race -v ./...
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release

on:
push:
tags:
- "v*"

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41 changes: 41 additions & 0 deletions .github/workflows/reviewdog.yml
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
19 changes: 19 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Gosec
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
tests:
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- name: Checkout Source
uses: actions/checkout@v4
- name: Run Gosec Security Scanner
uses: securego/gosec@master
with:
args: ./...
31 changes: 31 additions & 0 deletions .github/workflows/windows_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: WindowsUnitTest

on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
unit_test:
name: Unit test (windows)

strategy:
matrix:
platform: [windows-latest]

runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v4
with:
go-version: "1"
check-latest: true

- name: Run unit test
run: |
go mod download
go test -race -v ./...
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@

# Go workspace file
go.work
cover.*
data
localstack
2 changes: 2 additions & 0 deletions .gitleaksignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
389697647cbf4df63a2d2949f648216025355763:localstack/cache/server.test.pem.key:private-key:1
389697647cbf4df63a2d2949f648216025355763:localstack/cache/server.test.pem:private-key:1
54 changes: 54 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
run:
go: "1.20"

issues:
exclude-use-default: false

linters:
disable-all: true
enable:
- deadcode
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- structcheck
- typecheck
- unused
- varcheck
- asciicheck
- bodyclose
- dogsled
- dupl
- durationcheck
- errorlint
- exhaustive
- exportloopref
- forcetypeassert
- gochecknoinits
- goconst
- gocritic
- goimports
- gomnd
- gosec
- ifshort
- misspell
- nakedret
- noctx
- prealloc
- rowserrcheck
- sqlclosecheck
- stylecheck
- tagliatelle
- thelper
- unconvert
- unparam
- wastedassign
- whitespace
linters-settings:
tagliatelle:
case:
use-field-name: true
rules:
json: snake
17 changes: 17 additions & 0 deletions .octocov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# generated by octocov init
coverage:
if: true
acceptable: 60%
diff:
datastores:
- artifact://${GITHUB_REPOSITORY}
comment:
if: is_pull_request
hideFooterLink: false
summary:
if: true
report:
if: is_default_branch
datastores:
- artifact://${GITHUB_REPOSITORY}

2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## [](/compare/77bdf974281a...) (2023-12-23)

1 change: 1 addition & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Please approach others with respect. That is everything.
Loading

0 comments on commit 200e770

Please sign in to comment.