Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Github Actions by adding super linter #264

Merged
merged 18 commits into from
Dec 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ default: false # includes/excludes all rules by default
MD001: true

# Heading style <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md003>
MD003: true
MD003:
ankurdotb marked this conversation as resolved.
Show resolved Hide resolved
style: 'consistent'

# Unordered list style <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md004>
MD004: true
MD004:
style: 'consistent'

# Inconsistent indentation for list items at the same level <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md005>
Expand All @@ -30,7 +30,7 @@ MD010: false
MD011: true

# Multiple consecutive blank lines <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md012>
MD012: true
MD012:
maximum: 2

# Line length <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md013>
Expand Down Expand Up @@ -58,7 +58,7 @@ MD022: true
MD023: true

# Multiple headings with the same content <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md024>
MD024: true
MD024:
allow_different_nesting: true

# Multiple top level headings in the same document <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md025>
Expand All @@ -74,7 +74,7 @@ MD027: true
MD028: false

# Ordered list item prefix <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md029>
MD029: true
MD029:
style: 'one_or_ordered'

# Spaces after list markers <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md030>
Expand All @@ -87,7 +87,7 @@ MD031: true
MD032: true

# Inline HTML <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md033>
MD033: true
MD033:
allowed_elements: ['a']

# Bare URL used <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md034>
Expand Down Expand Up @@ -137,9 +137,3 @@ MD047: true
# Code fence style <https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md048>
MD048:
style: 'consistent'

# Custom rules:
# CHANGELOG-RULE-001: false
# CHANGELOG-RULE-002: false
# CHANGELOG-RULE-003: false
# CHANGELOG-RULE-004: false
60 changes: 60 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Lint

on: [push]
ankurdotb marked this conversation as resolved.
Show resolved Hide resolved

jobs:

# We can't use VALIDATE_GO from super linter because of this issue:
# https://github.com/github/super-linter/issues/143
go-lint:
name: Lint go
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2

- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.43.0
args: --timeout 5m0s

md-link-check:
name: Check markdown links
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Check if Markdown links are valid
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
config-file: '.github/linters/mlc_config.json'
folder-path: "."

super-lint:
name: Run super linter
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Super-Linter
uses: github/super-linter/slim@v4
env:
VALIDATE_MARKDOWN: true
ankurdotb marked this conversation as resolved.
Show resolved Hide resolved
VALIDATE_XML: true
VALIDATE_YAML: true
VALIDATE_OPENAPI: true
# VALIDATE_BASH: true
# VALIDATE_BASH_EXEC: true
# VALIDATE_DOCKERFILE_HADOLINT: true
# VALIDATE_ENV: true
# VALIDATE_GITHUB_ACTIONS: true
# VALIDATE_PROTOBUF: true
# VALIDATE_SHELL_SHFMT: true

VALIDATE_ALL_CODEBASE: true
LOG_LEVEL: WARN

DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44 changes: 0 additions & 44 deletions .github/workflows/markdown-ci.yml

This file was deleted.

116 changes: 0 additions & 116 deletions .github/workflows/markdown-ci/markdown-rules.js

This file was deleted.

14 changes: 1 addition & 13 deletions .github/workflows/node-ci.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: cheqd-node CI
name: Test

on:
push:
Expand All @@ -14,22 +14,10 @@ env:
VERSION: "1.0.0" # Package build scripts require version to be provided

jobs:
lint:
name: Lint
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2

- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.43.0
args: --timeout 5m0s

run-unit-test:
name: Run unit tests
runs-on: ubuntu-20.04
needs: lint
steps:
- name: Set up Go 1.17
uses: actions/setup-go@v2
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ The [**cheqd Community Slack**](http://cheqd.link/join-cheqd-slack) is our chat

Please reach out to us there for discussions, help, and feedback on the project.

## Bug Reporting & New Feature Requests
## Bug Reporting & New Feature Requests

If you notice anything not behaving how you expected, or would like to make a suggestion / request for a new feature, please submit a **bug_report** or **feature_request** by creating a [**New Issue**](https://github.com/cheqd/cheqd-node/issues/new/choose) and selecting the relevant template.
If you notice anything not behaving how you expected, or would like to make a suggestion / request for a new feature, please submit a **bug_report** or **feature_request** by creating a [**New Issue**](https://github.com/cheqd/cheqd-node/issues/new/choose) and selecting the relevant template.


### Social media
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ The payment flow can be broken down into five steps:
* **`denom`**: Defined in `details.total.amount.currency` from the Payment Request
2. **Build a transaction with the request from the previous step** Example: `cheqd_ledger::auth::build_tx(pool_alias, pub_key, builded_request, account_number, account_sequence, max_gas, max_coin_amount, denom, timeout_height, memo)`
* `memo`: This should be the same as `details.id` from the Payment Request
3. **Sign the transaction** Example:`cheqd_keys::sign(wallet_handle, key_alias, tx)`.
3. **Sign the transaction** Example:`cheqd_keys::sign(wallet_handle, key_alias, tx)`.
4. **Broadcast the signed transaction** Example: `cheqd_pool::broadcast_tx_commit(pool_alias, signed)`.

#### Response format
Expand Down Expand Up @@ -197,7 +197,7 @@ Holder -> Issuer: Accept

## References

* [Hyperledger Aries RFC 0036: Issue Credential Protocol 1.0 ](https://github.com/hyperledger/aries-rfcs/blob/main/features/0036-issue-credential/README.md)
* [Hyperledger Aries RFC 0036: Issue Credential Protocol 1.0](https://github.com/hyperledger/aries-rfcs/blob/main/features/0036-issue-credential/README.md)
* [Hyperledger Aries RFC 0075: Payment Decorators](https://github.com/hyperledger/aries-rfcs/blob/main/features/0075-payment-decorators/README.md)
* [Evernym VDR Tools cheqd network payments ADR](https://gitlab.com/evernym/verity/vdr-tools/-/tree/cheqd/docs/design/014-bank-transactions)

4 changes: 2 additions & 2 deletions architecture/adr-list/adr-003-cli-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

Due to the nature of the cheqd project merging concepts from the [Cosmos blockchain framework](https://github.com/cosmos/cosmos-sdk) and self-sovereign identity \(SSI\), there are two potential options for creating Command Line Interface \(CLI\) tools for developers to use:

1. **Cosmos-based CLI:** Most likely route for Cosmos projects for their node application. Most existing Cosmos node validators will be familiar with this method of managing their node.
1. **Cosmos-based CLI:** Most likely route for Cosmos projects for their node application. Most existing Cosmos node validators will be familiar with this method of managing their node.
2. **VDR CLI**: Traditionally, a lot of SSI networks have used [Hyperledger Indy](https://github.com/hyperledger/indy-node) and therefore the Indy CLI tool for managing and interacting with the ledger. This has now been renamed to [Verifiable Data Registry \(VDR\) Tools CLI](https://gitlab.com/evernym/verity/vdr-tools) and is the tool that most existing SSI node operators \("stewards"\) would be familiar with.

Ideally, the `cheqd-node` project would provide a consistent set of CLI tools rather than two separate tools with varying feature sets between them.
Expand Down Expand Up @@ -41,7 +41,7 @@ This ADR will focus on the CLI tool architecture choice for `cheqd-node`.

### Options considered

#### 1. Keep both Cosmos CLI and VDR Tools CLI, but use them for different purposes.
#### 1. Keep both Cosmos CLI and VDR Tools CLI, but use them for different purposes

**Pros:**

Expand Down
20 changes: 10 additions & 10 deletions architecture/adr-list/adr-005-genesis-parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,16 +125,16 @@ Cosmos application is divided [into a list of modules](https://docs.cosmos.netwo
* Amount of unbound/redelegate entries to store
* `bond_denom` = `ncheq`
* Denomination used in staking
* **`ibc`**
* `max_expected_time_per_block` = `30000000000` (expressed in nanoseconds, ~ 30 seconds)
* Maximum expected time per block, used to enforce block delay. This parameter should reflect the largest amount of time that the chain might reasonably take to produce the next block under normal operating conditions. A safe choice is 3-5x the expected time per block.
* `allowed_clients` = `[ "06-solomachine", "07-tendermint" ]`
* Defines the list of allowed client state types. We allow connections from other chains using the [Tendermint client](https://github.com/cosmos/ibc-go/blob/main/modules/light-clients/07-tendermint), and with light clients using the [Solo Machine client](https://github.com/cosmos/ibc-go/blob/main/modules/light-clients/06-solomachine).
* **`ibc-transfer`**
* `send_enabled` = `true`
* Enables or disables all cross-chain token transfers from this chain
* `receive_enabled` = `true`
* Enables or disables all cross-chain token transfers to this chain
* **`ibc`**
* `max_expected_time_per_block` = `30000000000` (expressed in nanoseconds, ~ 30 seconds)
* Maximum expected time per block, used to enforce block delay. This parameter should reflect the largest amount of time that the chain might reasonably take to produce the next block under normal operating conditions. A safe choice is 3-5x the expected time per block.
* `allowed_clients` = `[ "06-solomachine", "07-tendermint" ]`
* Defines the list of allowed client state types. We allow connections from other chains using the [Tendermint client](https://github.com/cosmos/ibc-go/blob/main/modules/light-clients/07-tendermint), and with light clients using the [Solo Machine client](https://github.com/cosmos/ibc-go/blob/main/modules/light-clients/06-solomachine).
* **`ibc-transfer`**
* `send_enabled` = `true`
* Enables or disables all cross-chain token transfers from this chain
* `receive_enabled` = `true`
* Enables or disables all cross-chain token transfers to this chain

## Decision

Expand Down
Loading