Skip to content

Commit

Permalink
Initial commit 🥳
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Eikemeier <eikemeier@fillmore-labs.com>
  • Loading branch information
eikemeier committed Jan 31, 2024
0 parents commit 9417ff0
Show file tree
Hide file tree
Showing 21 changed files with 1,055 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .buildkite/pipeline.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
steps:
- label: ':go: Lint'
commands:
- golangci-lint run --timeout 10m0s

- label: ':hammer: Test'
commands:
- gotestsum --junitfile test.xml ./...
plugins:
- test-collector#v1.10.0:
files: test.xml
format: junit

- label: ':codecov: + :codeclimate: Coverage'
commands:
- go test -race -coverprofile=cover.out ./...
- sh .buildkite/upload_coverage.sh cover.out
16 changes: 16 additions & 0 deletions .buildkite/upload_coverage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh

COVERAGE_REPORT="$1"
test -r "$COVERAGE_REPORT" || exit 1

echo "Upload Codecov Coverage"
codecov -f "$COVERAGE_REPORT" &
PID1=$!

echo "Upload Code Climate Coverage"
cc-test-reporter format-coverage -t gocov -p fillmore-labs.com/exp/async -o .coverage/codeclimate.json "$COVERAGE_REPORT"
cc-test-reporter upload-coverage -r "$CC_TEST_REPORTER_ID" -i .coverage/codeclimate.json &
PID2=$!

wait $PID1 $PID2 || true
echo "Coverage Upload Done"
14 changes: 14 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
version: "2"
checks:
similar-code:
enabled: false
identical-code:
enabled: false
exclude_patterns:
- "**/.*"
- "**/*_test.go"
- "**/*.md"
- "go.mod"
- "go.sum"
- "LICENSE"
26 changes: 26 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
* text=auto
*.adoc text
*.bat text eol=crlf
*.bazel text
*.bin filter=lfs diff=lfs merge=lfs -text
*.bzl text
*.css text eol=lf
*.env text
*.go text
*.html text eol=lf
*.jar filter=lfs diff=lfs merge=lfs -text
*.java text
*.js text eol=lf
*.json text
*.md text
*.patch text
*.png filter=lfs diff=lfs merge=lfs -text
*.proto text linguist-detectable
*.scala text
*.ts text eol=lf
*.yaml text
*.zip filter=lfs diff=lfs merge=lfs -text
go.mod text
go.sum text
BUILD text -linguist-detectable
WORKSPACE text -linguist-detectable
7 changes: 7 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
coverage:
status:
project: false
patch: false
ignore:
- internal/mocks
8 changes: 8 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"automerge": true,
"automergeType": "branch",
"extends": [
"config:base",
":disableDependencyDashboard"
]
}
21 changes: 21 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Go
"on":
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21"
check-latest: true
- name: Test
run: go test -race ./...
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.*
!/.buildkite/
!/.codeclimate.yml
!/.envrc
!/.gitattributes
!/.github/
!/.gitignore
!/.golangci.yaml
!/.markdownlint.json
!/.mockery.yaml
!/.yamlfmt
!/.yamllint
/bin/
/cover.out
/test.xml
43 changes: 43 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
run:
modules-download-mode: readonly
linters:
enable-all: true
disable:
# deprecated
- deadcode
- exhaustivestruct
- golint
- ifshort
- interfacer
- maligned
- nosnakecase
- scopelint
- structcheck
- varcheck
# disabled
- depguard
- exhaustruct
- forbidigo
- ireturn
- nonamedreturns
- varnamelen
- wrapcheck
- wsl
linters-settings:
testifylint:
enable:
- bool-compare
- compares
- empty
- error-is-as
- error-nil
- expected-actual
- float-compare
# - go-require
- len
# - nil-compare
# - require-error
- suite-dont-use-pkg
- suite-extra-assert-call
- suite-thelper
11 changes: 11 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"no-hard-tabs": {
"ignore_code_languages": [
"go"
],
"spaces_per_tab": 4
},
"line-length": {
"line_length": 120
}
}
8 changes: 8 additions & 0 deletions .yamlfmt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
formatter:
type: basic
include_document_start: true
retain_line_breaks: true
scan_folded_as_literal: true
max_line_length: 100
pad_line_comments: 2
7 changes: 7 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
extends: default
rules:
empty-lines:
max: 1
line-length:
max: 120
Loading

0 comments on commit 9417ff0

Please sign in to comment.