-
Notifications
You must be signed in to change notification settings - Fork 1
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
0 parents
commit 130318e
Showing
29 changed files
with
1,862 additions
and
0 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,2 @@ | ||
[build] | ||
delay = 3000 |
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,16 @@ | ||
codecov: | ||
require_ci_to_pass: false | ||
|
||
coverage: | ||
status: | ||
project: | ||
default: | ||
target: auto | ||
threshold: 3% | ||
informational: true | ||
|
||
patch: | ||
default: | ||
target: auto | ||
threshold: 25% | ||
informational: true |
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,33 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us fix bugs | ||
title: "" | ||
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. | ||
|
||
**Logs** | ||
If applicable, attach logs | ||
|
||
<details><summary>Log output</summary> | ||
```plain | ||
Add your log output here. | ||
``` | ||
</details> | ||
|
||
**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,19 @@ | ||
--- | ||
name: Feature Request | ||
about: Request a new feature, something that the software can’t do yet | ||
title: "" | ||
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,24 @@ | ||
name: "go test" | ||
description: "runs go tests" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Check out repository | ||
uses: actions/[email protected] | ||
|
||
- name: Set up go | ||
uses: actions/[email protected] | ||
with: | ||
# renovate: go-version | ||
go-version: 1.18.4 | ||
|
||
- name: Run go tests | ||
shell: bash | ||
run: | | ||
go test ./... -race -covermode=atomic -coverprofile=coverage.out | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
files: coverage.out |
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: pre-commit | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- uses: actions/[email protected] | ||
with: | ||
go-version: 1.19.0 | ||
|
||
- name: Install go tooling | ||
run: | | ||
make setup-pre-commit-ci | ||
- uses: pre-commit/[email protected] |
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,25 @@ | ||
name: Validate renovate config | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- renovate.json | ||
- .github/workflows/renovate-config-validator.yml | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- renovate.json | ||
- .github/workflows/renovate-config-validator.yml | ||
|
||
jobs: | ||
validate: | ||
name: Validate renovate config | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Validate | ||
uses: rinchsan/[email protected] |
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,17 @@ | ||
name: "Lint PR" | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
|
||
jobs: | ||
semantic-pull-request: | ||
name: Semantic Pull Request | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: amannn/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,48 @@ | ||
name: test & release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
permissions: | ||
contents: write | ||
packages: write | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/[email protected] | ||
|
||
- name: go test | ||
uses: ./.github/actions/go-test | ||
|
||
release: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Go | ||
uses: actions/[email protected] | ||
with: | ||
go-version: 1.19.0 | ||
|
||
- uses: docker/[email protected] | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v3 | ||
with: | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,37 @@ | ||
name: test & tag | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/[email protected] | ||
|
||
- name: go test | ||
uses: ./.github/actions/go-test | ||
|
||
tag: | ||
runs-on: ubuntu-latest | ||
needs: test | ||
container: ghcr.io/caarlos0/svu | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.EZ_BOT_TOKEN }} | ||
|
||
- name: Tag new version | ||
run: | | ||
if [ $(git tag -l "$(svu next)") ]; then | ||
echo "Tag already exists, no release necessary" | ||
else | ||
echo "Tagging new version" | ||
git tag "$(svu next)" | ||
git push --tags | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: "test" | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
tags-ignore: | ||
- "v*" | ||
|
||
workflow_call: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/[email protected] | ||
|
||
- name: go test | ||
uses: ./.github/actions/go-test |
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,16 @@ | ||
coverage.out | ||
/standalone | ||
dist/ | ||
tmp/ | ||
/data | ||
|
||
# Created in the workflows but need to be ignored | ||
node_modules/ | ||
package-lock.json | ||
package.json | ||
|
||
# VSCode logs | ||
.vscode/*.log | ||
|
||
# Frontend files | ||
/public |
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,32 @@ | ||
issues: | ||
fix: true | ||
|
||
# Relax rules for tests | ||
exclude-rules: | ||
- path: _test\.go | ||
linters: | ||
- gocyclo | ||
- errcheck | ||
- dupl | ||
|
||
linters: | ||
enable: | ||
- gocyclo | ||
- godot | ||
- gofumpt | ||
- goimports | ||
- govet | ||
- revive | ||
- whitespace | ||
- misspell | ||
|
||
linters-settings: | ||
gofumpt: | ||
lang-version: "1.19" | ||
extra-rules: true | ||
gocyclo: | ||
min-complexity: 15 | ||
|
||
godot: | ||
exclude: | ||
- "^ @[A-Za-z]+ " |
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,52 @@ | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
ldflags: | ||
- -X github.com/envelope-zero/backend/pkg/router.version=1.0.1 | ||
|
||
archives: | ||
- replacements: | ||
amd64: x86_64 | ||
|
||
snapshot: | ||
name_template: "{{ incpatch .Version }}-next" | ||
|
||
changelog: | ||
use: github | ||
groups: | ||
- title: Features | ||
regexp: "^.*feat[(\\w)]*:+.*$" | ||
order: 0 | ||
|
||
- title: "Bug fixes" | ||
regexp: "^.*fix[(\\w)]*:+.*$" | ||
order: 1 | ||
|
||
- title: Others | ||
order: 2 | ||
|
||
- title: "Dependency updates" | ||
regexp: "^.*chore(deps):+.*$" | ||
order: 3 | ||
|
||
filters: | ||
# Commit messages matching the regexp listed here will be removed from | ||
# the changelog | ||
exclude: | ||
- "^docs:" | ||
- "^test:" | ||
|
||
dockers: | ||
- dockerfile: Dockerfile.goreleaser | ||
image_templates: | ||
- "ghcr.io/envelope-zero/standalone:{{ .Tag }}" | ||
- "ghcr.io/envelope-zero/standalone:v{{ .Major }}" | ||
- "ghcr.io/envelope-zero/standalone:v{{ .Major }}.{{ .Minor }}" | ||
- "ghcr.io/envelope-zero/standalone:latest" |
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,21 @@ | ||
default_stages: [commit] | ||
repos: | ||
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook | ||
rev: v9.0.0 | ||
hooks: | ||
- id: commitlint | ||
stages: [commit-msg] | ||
additional_dependencies: ["@commitlint/config-conventional"] | ||
|
||
- repo: https://github.com/dnephin/pre-commit-golang | ||
rev: v0.5.0 | ||
hooks: | ||
- id: go-mod-tidy | ||
- id: golangci-lint | ||
args: | ||
- "--timeout=5m" | ||
|
||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: v2.7.1 | ||
hooks: | ||
- id: prettier |
Oops, something went wrong.