From 6a58f2b211ebf8be49693e178aa4341697f222df Mon Sep 17 00:00:00 2001 From: ktr0731 Date: Thu, 10 Dec 2020 19:00:32 +0900 Subject: [PATCH] add GitHub Actions --- .github/FUNDING.yml | 4 +++ .github/ISSUE_TEMPLATE/bug_report.md | 29 +++++++++++++++++++++ .github/no-response.yml | 8 ++++++ .github/workflows/main.yml | 38 ++++++++++++++++++++++++++++ README.md | 1 + 5 files changed, 80 insertions(+) create mode 100644 .github/FUNDING.yml create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/no-response.yml create mode 100644 .github/workflows/main.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..dba4861 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,4 @@ +# These are supported funding model platforms + +github: [ktr0731] +custom: https://paypal.me/ktr0731 diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..2f6e965 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,29 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: bug +assignees: '' + +--- + +## Describe the bug + +## To reproduce + + +## Expected behavior + +## Screenshots + + +## Environment +- OS: +- Terminal: +- go-fuzzyfinder version: + +## Additional context + diff --git a/.github/no-response.yml b/.github/no-response.yml new file mode 100644 index 0000000..d7ccd79 --- /dev/null +++ b/.github/no-response.yml @@ -0,0 +1,8 @@ +daysUntilClose: 7 +responseRequiredLabel: 'response needed' +closeComment: > + This issue has been automatically closed because there has been no response + to our request for more information from the original author. With only the + information that is currently in the issue, we don't have enough information + to take action. Please reach out if you have or find the answers we need so + that we can investigate further. diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..7183a38 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,38 @@ +name: main +on: [push, pull_request] +jobs: + test: + name: Build on ${{ matrix.os }} with Go ${{ matrix.go }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macOS-latest] + go: ['1.14'] + steps: + - name: Set up Go ${{ matrix.go }} + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go }} + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Download dependencies + run: go mod download + + - name: Cache modules + uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.OS }}-go-${{ hashFiles('**/go.sum') }} + + - name: Build + run: go build + + - name: Test + run: go test -v ./... + + - name: Lint + uses: golangci/golangci-lint-action@v2 + with: + version: v1.33.0 diff --git a/README.md b/README.md index 5b4d086..4a778ee 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # apigen [![PkgGoDev](https://pkg.go.dev/badge/github.com/ktr0731/apigen)](https://pkg.go.dev/github.com/ktr0731/apigen) +[![GitHub Actions](https://github.com/ktr0731/apigen/workflows/main/badge.svg)](https://github.com/ktr0731/apigen/actions) `apigen` generates API client via execution environment such as `curl`.