diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..890ed58 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,29 @@ +- With issues: + - Use the search tool before opening a new issue. + - Please provide source code and commit sha if you found a bug. + - Review existing issues and provide feedback or react to them. + +## Description + + + +## How to reproduce + + +TODO + +## Expectations + + +TODO + +## Actual result + + +TODO + +## Environment + +- go version: +- operating system: +- version (or commit ref): diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..f35d8c3 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,7 @@ +- With pull requests: + - Open your pull request against `main` + - Your pull request should have no more than two commits, if not you should squash them. + - It should pass all tests in the available continuous integration systems such as GitHub Actions. + - You should add/modify tests to cover your proposed code changes. + - If your pull request contains a new feature, please document it on the README. + diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..b444581 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "gomod" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "daily" diff --git a/.github/workflows/code-check.yaml b/.github/workflows/code-check.yaml new file mode 100644 index 0000000..4d2ae91 --- /dev/null +++ b/.github/workflows/code-check.yaml @@ -0,0 +1,47 @@ +# Reference from: +# https://github.com/c-bata/go-prompt/blob/master/.github/workflows/test.yml +name: Code check +on: + pull_request: + branches: + - main + push: + branches: + - main + +jobs: + test: + name: Run test + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + steps: + - name: Set up Go 1.19 + uses: actions/setup-go@v2 + with: + go-version: 1.19 + id: go + - uses: actions/checkout@v2 + - name: Running go tests + env: + GO111MODULE: on + run: make cover + - name: Send coverage + uses: shogo82148/actions-goveralls@v1 + with: + path-to-profile: coverage.out + lint: + name: Run lint check + runs-on: ubuntu-latest + steps: + - name: Set up Go 1.19 + uses: actions/setup-go@v3 + with: + go-version: 1.19 + id: go + - uses: actions/checkout@v3 + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + version: v1.52.2 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..26a33bd --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,14 @@ +name: 'Release Changelog' +on: + push: + tags: + - "v*" +jobs: + tagged-release: + name: "Tagged Release" + runs-on: "ubuntu-latest" + steps: + - uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + prerelease: false