Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardoaraujor committed Mar 10, 2022
0 parents commit a86c95f
Show file tree
Hide file tree
Showing 28 changed files with 14,601 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.git
**/target/
**/*.txt
**/*.md
/docker/
!/target/release/polkadot-collator

# dotfiles in the repo root
/.*
29 changes: 29 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
root = true
[*]
indent_style=tab
indent_size=tab
tab_width=4
end_of_line=lf
charset=utf-8
trim_trailing_whitespace=true
max_line_length=100
insert_final_newline=true

[*.yml]
indent_style=space
indent_size=2
tab_width=8
end_of_line=lf

[*.sh]
indent_style=space
indent_size=4
tab_width=8
end_of_line=lf

[*.json]
indent_style=space
indent_size=2
tab_width=8
end_of_line=lf

47 changes: 47 additions & 0 deletions .github/workflows/test-code.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Test Code

on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
test-code:
runs-on: ubuntu-20.04

steps:
- name: Checkout Code
uses: actions/checkout@v2

# Steps taken from https://github.com/actions/cache/blob/master/examples.md#rust---cargo
- name: Cache cargo registry
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}

- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2021-12-01
components: rustfmt, clippy
target: wasm32-unknown-unknown
override: true
default: true

# Enable this for clippy linting.
# - name: Check and Lint Code
# run: cargo +nightly-2021-12-01 clippy -- -D warnings

- name: Check Code
run: cargo check

- name: Test Code
run: cargo test
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Cargo compiled files and executables
**/target/

# These are backup files generated by rustfmt
**/*.rs.bk

# Local chain databases (defalut location)
**/chains/

# The cache for chain data in container
.local

# The cache for docker container dependency
/.cargo/config

.DS_Store
.idea
.vscode
23 changes: 23 additions & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Basic
hard_tabs = true
max_width = 100
use_small_heuristics = "Max"

# Imports
imports_granularity = "Crate"
reorder_imports = true

# Consistency
newline_style = "Unix"

# Misc
binop_separator = "Back"
chain_width = 80
match_arm_blocks = false
match_arm_leading_pipes = "Preserve"
match_block_trailing_comma = true
reorder_impl_items = false
spaces_around_ranges = false
trailing_comma = "Vertical"
trailing_semicolon = false
use_field_init_shorthand = true
Loading

0 comments on commit a86c95f

Please sign in to comment.