Skip to content

Commit

Permalink
🌱 Seed Commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinJoiner committed Mar 4, 2024
1 parent 0559f1d commit c4c2d41
Show file tree
Hide file tree
Showing 29 changed files with 3,863 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
# Maintain dependencies for Go
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"

# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
40 changes: 40 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Test

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.20", "1.21", "1.22"]

steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
# You can test your matrix by printing the current Go version

- name: Get dependencies
run: |
go get -v -t ./...
go install gotest.tools/gotestsum@latest
- name: modVerify
run: go mod verify

- name: Run Tests with go testsum
run: gotestsum --format pkgname --jsonfile test.json

- name: Annotate tests
if: always()
uses: guyarb/golang-test-annotations@v0.8.0
with:
test-results: test.json
27 changes: 27 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: golangci-lint
on:
pull_request:
branches: ["**"]
env:
GOPRIVATE: github.com/DIMO-Network
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
golangci:
runs-on: ubuntu-latest

name: lint
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21

- name: Checkout code
uses: actions/checkout@v4

- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: latest
only-new-issues: false
args: --modules-download-mode=readonly --timeout=5m
31 changes: 31 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Go workspace file
go.work

# VS code files
.vscode/*
*.code-workspace
.history/

# allow launch.json
!.vscode/launch.json

# GoLand
.idea/


58 changes: 58 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
linters-settings:
funlen:
lines: 100
statements: 50
gocyclo:
min-complexity: 15
goimports:
local-prefixes: github.com/DIMO-Network/mnemonic
govet:
check-shadowing: true
misspell:
locale: US
ignore-words:
- artefact
nolintlint:
allow-unused: false # report any unused nolint directives
require-explanation: true # require an explanation for nolint directives
require-specific: false # don't require nolint directives to be specific about which linter is being skipped
revive:
confidence: 0

linters:
disable-all: true
enable:
- bodyclose
- dogsled
- dupl
- errcheck
- exportloopref
- funlen
- gocritic
- goconst
- gocyclo
- gofumpt
- goimports
- revive
- rowserrcheck
- goprintffuncname
- gosec
- gosimple
- govet
- ineffassign
- misspell
- nakedret
- noctx
- nolintlint
- staticcheck
- stylecheck
- sqlclosecheck
- typecheck
- unconvert
- unparam
- unused
- whitespace

issues:
# enable issues excluded by default
exclude-use-default: false
21 changes: 21 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Run codegen",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/internal/codegen/cmd",
"args": [
"-output=${workspaceFolder}/pkg/vss",
"-spec=${workspaceFolder}/schema/vss_rel_4.2-DIMO.csv",
"-migrations=${workspaceFolder}/schema/migrations.json",
"-package=vss"
]
}
]
}
Loading

0 comments on commit c4c2d41

Please sign in to comment.