Skip to content

Commit

Permalink
Merge pull request #5 from provenance-io/github-config
Browse files Browse the repository at this point in the history
GitHub config
  • Loading branch information
iramiller authored Jan 21, 2021
2 parents f2a263b + c81a696 commit 0b7e42d
Show file tree
Hide file tree
Showing 8 changed files with 155 additions and 4 deletions.
13 changes: 13 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# CODEOWNERS: https://help.github.com/articles/about-codeowners/

# NOTE: Order is important; the last matching pattern takes the
# most precedence.

# Secondary repo maintainers, substitutes of the primary
# maintainers when they become MIA
* @channa-figure @arnabmitra

# Primary repo maintainers
* @iramiller @dpederson-figure @mtps


35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Bug Report
about: Create a report to help us address issues

---

<!-- --------------------------------------------------------
Thank you for opening an issue.
Before submitting this request please review this template
and check for existing duplicate issues first.
-------------------------------------------------------- -->


## Summary of Bug

<!-- Concisely describe the issue -->

## Version

<!-- git commit hash or release version -->

## Steps to Reproduce

<!-- What commands in order should someone run to reproduce your problem? -->

____

## For Admin Use

- [ ] Not duplicate issue
- [ ] Appropriate labels applied
- [ ] Appropriate contributors tagged
- [ ] Contributor assigned/self-assigned
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Feature Request
about: Create a proposal to request a feature

---


<!-- --------------------------------------------------------
Thank you for opening an issue.
Before submitting this request please review this template.
-------------------------------------------------------- -->


## Summary

<!-- Short, concise description of the proposed feature -->

## Problem Definition

<!-- Why do we need this feature?
What problems may be addressed by introducing this feature?
What benefits does the Provenance Network stand to gain by including this feature?
Should this feature be implemented in the Cosmos SDK directly? Consider submitting
this request upstream instead.
Are there any disadvantages of including this feature? -->

## Proposal

<!-- Detailed description of requirements of implementation -->

____

#### For Admin Use

- [ ] Not duplicate issue
- [ ] Appropriate labels applied
- [ ] Appropriate contributors tagged
- [ ] Contributor assigned/self-assigned
17 changes: 17 additions & 0 deletions .github/workflows/clean-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Remove old artifacts

on:
schedule:
# Every day at 1am
- cron: '0 1 * * *'

jobs:
remove-old-artifacts:
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Remove old artifacts
uses: c-hive/gha-remove-artifacts@v1
with:
age: '7 days'
28 changes: 28 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Lint
# This workflow is run on every pull request and push to main
# The `golangci` will pass without running if no *.{go, mod, sum} files have been changed.
on:
pull_request:
push:
branches:
- main
jobs:
golangci:
name: golangci-lint
runs-on: ubuntu-latest
timeout-minutes: 6
steps:
- uses: actions/checkout@v2
- uses: technote-space/get-diff-action@v4
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- uses: golangci/golangci-lint-action@master
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.28
args: --timeout 10m
github-token: ${{ secrets.github_token }}
if: env.GIT_DIFF
21 changes: 21 additions & 0 deletions .github/workflows/proto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Protobuf
# Protobuf runs buf (https://buf.build/) lint and check-breakage
# This workflow is only run when a .proto file has been changed
on:
pull_request:
paths:
- "**.proto"
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@master
- name: lint
run: make proto-lint
# breakage:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@master
# - name: check-breakage
# run: make proto-check-breaking
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,6 @@ test-race:
test-cover:
@go test -mod=readonly -timeout 30m -race -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock' ./...

test-build: build
@go test -mod=readonly -p 4 `go list ./cli_test/...` -tags=cli_test -v

benchmark:
@go test -mod=readonly -bench=. ./...

Expand Down
2 changes: 1 addition & 1 deletion x/attribute/types/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func SplitAccountAttributeKey(key []byte) (addr sdk.AccAddress, name_id []byte,
panic(fmt.Sprintf("unexpected key length (%d ≠ %d)", len(key), AttributeKeyLength))
}
// first byte is key prefix for AttributeKey
addr = sdk.AccAddress(key[1:sdk.AddrLen])
addr = sdk.AccAddress(key[1 : sdk.AddrLen+1])
name_id = key[1+sdk.AddrLen : sdk.AddrLen+32]
value_id = key[1+sdk.AddrLen+32 : 1+sdk.AddrLen+64]
return
Expand Down

0 comments on commit 0b7e42d

Please sign in to comment.