-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0934c7d
commit 517ef45
Showing
8 changed files
with
251 additions
and
3 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,31 @@ | ||
--- | ||
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. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
- Version [e.g. 22] | ||
- OS | ||
|
||
**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,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: "[ Feature ] -" | ||
labels: enhancement | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request 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,8 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: / | ||
commit-message: | ||
prefix: "workflows:" | ||
schedule: | ||
interval: weekly |
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,65 @@ | ||
name: Go Tests | ||
on: [push, pull_request] | ||
jobs: | ||
build-1_22: | ||
name: Build 1.22 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.22 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.22' | ||
check-latest: true | ||
cache: false | ||
id: go | ||
- name: Disable cgo | ||
run: | | ||
echo "CGO_ENABLED=0" >> $GITHUB_ENV | ||
- name: Show version | ||
run: go version | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
- name: Build | ||
run: go build -v . | ||
|
||
build-1_23: | ||
name: Build 1.23 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.23 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.23' | ||
check-latest: true | ||
cache: false | ||
id: go | ||
- name: Disable cgo | ||
run: | | ||
echo "CGO_ENABLED=0" >> $GITHUB_ENV | ||
- name: Show version | ||
run: go version | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
- name: Build | ||
run: go build -v . | ||
|
||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.23 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.23' | ||
check-latest: true | ||
cache: false | ||
id: go | ||
- name: Disable cgo | ||
run: | | ||
echo "CGO_ENABLED=0" >> $GITHUB_ENV | ||
- name: Show version | ||
run: go version | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
- name: Test | ||
run: go test -v ./... |
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,76 @@ | ||
name: Linters | ||
on: [push, pull_request] | ||
jobs: | ||
golangci-lint: | ||
name: golangci-lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.23 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.23' | ||
check-latest: true | ||
id: go | ||
- name: Disable cgo | ||
run: | | ||
echo "CGO_ENABLED=0" >> $GITHUB_ENV | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v6 | ||
with: | ||
version: v1.62.0 | ||
args: -c .golangci.yml -v | ||
skip-cache: true | ||
|
||
markdown-lint: | ||
name: markdown-lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Markdown files linting | ||
uses: avto-dev/markdown-lint@v1 | ||
with: | ||
args: '.' | ||
|
||
terrafmt: | ||
name: terrafmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.23 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.23' | ||
check-latest: true | ||
skip-cache: true | ||
id: go | ||
- name: Show version | ||
run: go version | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
- name: Check out terrafmt code | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: katbyte/terrafmt | ||
ref: v0.5.2 | ||
path: terrafmt | ||
skip-cache: true | ||
- name: Build terrafmt bin | ||
run: cd terrafmt && go install ./... && cd ${GITHUB_WORKSPACE} | ||
- name: Detect resource/data-source blocks without double quote on type and name (blocks not detected by terrafmt) | ||
run: | | ||
! egrep -i '((resource|data)\s+[-a-z0-9_"]+)\s+[-a-z0-9_"]+\s+\{' bastion/*_test.go docs/*.md docs/*/*.md | egrep -i -v '((resource|data)\s+"[-a-z0-9_]+")\s+"[-a-z0-9_]+"\s+\{' | ||
- name: Terrafmt diff on docs markdown | ||
run: find docs | egrep "md$" | sort | while read f; do terrafmt diff $f; done >> /tmp/results.md | ||
- name: Terrafmt diff on _test.go | ||
run: find bastion | egrep "_test.go" | sort | while read f; do terrafmt diff $f; done >> /tmp/results.test.go | ||
- name: Generate error if results not empty | ||
run: | | ||
if [[ -s /tmp/results.md || -s /tmp/results.test.go ]] ; then | ||
cat /tmp/results.md | ||
cat /tmp/results.test.go | ||
echo "terraform blocks in docs/test-go files not being properly formatted" | ||
exit 1 | ||
fi |
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
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,43 @@ | ||
run: | ||
timeout: 5m | ||
|
||
linters: | ||
enable-all: true | ||
disable: | ||
# deprecated | ||
- execinquery # deprecated 1.58.0 | ||
- gomnd # deprecated 1.58.0 | ||
- exportloopref # deprecated 1.60.2 | ||
# unwanted | ||
- cyclop | ||
- depguard | ||
- dupl | ||
- err113 | ||
- exhaustruct | ||
- forcetypeassert | ||
- funlen | ||
- gomoddirectives | ||
- mnd | ||
- nestif | ||
- paralleltest | ||
- tagliatelle | ||
- varnamelen | ||
- wsl | ||
|
||
linters-settings: | ||
gci: | ||
custom-order: true | ||
sections: | ||
- standard | ||
- localModule | ||
- default | ||
govet: | ||
enable-all: true | ||
disable: | ||
- fieldalignment | ||
gocognit: | ||
# minimal code complexity to report, 30 by default | ||
min-complexity: 30 | ||
gocyclo: | ||
# minimal code complexity to report, 30 by default | ||
min-complexity: 30 |
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,5 @@ | ||
MD013: | ||
code_blocks: false | ||
line_length: 250 | ||
MD014: false | ||
MD034: false |