Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…po-template-golang into joel/go-releaser
  • Loading branch information
joelsmith-2019 committed May 22, 2024
2 parents 43c1ca3 + f9858aa commit f1ae32d
Show file tree
Hide file tree
Showing 7 changed files with 152 additions and 64 deletions.
37 changes: 8 additions & 29 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,6 @@ body:
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: input
id: contact
attributes:
label: Contact Details
description: How can we get in touch with you if we need more info?
placeholder: ex. [email protected]
validations:
required: false
- type: textarea
id: what-happened
attributes:
Expand All @@ -27,27 +19,6 @@ body:
value: "A bug happened!"
validations:
required: true
- type: dropdown
id: version
attributes:
label: Version
description: What version of our software are you running?
options:
- 1.0.2 (Default)
- 1.0.3 (Edge)
default: 0
validations:
required: true
- type: dropdown
id: browsers
attributes:
label: What browsers are you seeing the problem on?
multiple: true
options:
- Firefox
- Chrome
- Safari
- Microsoft Edge
- type: textarea
id: logs
attributes:
Expand All @@ -62,3 +33,11 @@ body:
options:
- label: I agree to follow this project's Code of Conduct
required: true
- type: input
id: contact
attributes:
label: Contact Details
description: How can we get in touch with you if we need more info?
placeholder: ex. [email protected]
validations:
required: false
3 changes: 0 additions & 3 deletions .github/ISSUE_TEMPLATE/default.MD

This file was deleted.

41 changes: 41 additions & 0 deletions .github/ISSUE_TEMPLATE/docs_issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Docs Issue
description: File a bug report.
title: "[Docs Issue]: "
labels: ["docs", "triage"]
body:
- type: markdown
attributes:
value: Thanks for taking the time to let us know how we can approve the docs!
- type: input
id: docs_page_link
attributes:
label: What page needs improvement?
value: Link a URL if possible
validations:
required: true
- type: textarea
id: description
attributes:
label: Description
description: Please describe the way the docs didn't meet your needs.
- type: textarea
id: remedy
attributes:
label: Remedy
description: Please describe what you think needs to be added or changed for the docs to meet your needs.
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://example.com).
options:
- label: I agree to follow this project's Code of Conduct
required: true
- type: input
id: contact
attributes:
label: Contact Details
description: How can we get in touch with you if we need more info?
placeholder: ex. [email protected]
validations:
required: false
31 changes: 0 additions & 31 deletions .github/ISSUE_TEMPLATE/feature_request.MD

This file was deleted.

33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Feature Request
description: Request an enhancement or new feature
title: "[Feature]: "
body:
- type: textarea
id: inspiration
attributes:
label: Inspiration
description: What are you trying to accomplish but finding hard or not possible?
placeholder: What's your end goal?
validations:
required: true
- type: input
id: version
attributes:
label: version
description: What version of the software are you using?
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://example.com).
options:
- label: I agree to follow this project's Code of Conduct
required: true
- type: input
id: contact
attributes:
label: Contact Details
description: How can we get in touch with you if we need more info?
placeholder: ex. [email protected]
validations:
required: false
69 changes: 69 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# This workflow will ensure the project is tidy, buildable and all tests pass
# on every push to the main branch and on every pull request.
#
name: Build and Test

on:
push:
paths:
- "**.go"
- "go.sum"
branches: [main, master]
pull_request:
paths:
- "**.go"
- "go.sum"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
GO_VERSION: 1.21

jobs:

# Check if the go.mod file is tidy
tidy:
runs-on: ubuntu-latest
name: tidy
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- run: |
go mod tidy
CHANGES_IN_REPO=$(git status --porcelain)
if [[ -n "$CHANGES_IN_REPO" ]]; then
echo "Repository is dirty. Showing 'git status' and 'git --no-pager diff':"
git status && git --no-pager diff
exit 1
fi
# Build and compile the go project
build:
runs-on: ubuntu-latest
name: build
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- run: go build ./...

# Run all standard, go tests
test:
runs-on: ubuntu-latest
name: test
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout code
uses: actions/checkout@v4
- name: Test
run: go test ./...
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ import (
)

func main() {
fmt.Println("Hello, World!")
fmt.Println("Hello, Cosmos!")
}

0 comments on commit f1ae32d

Please sign in to comment.