Skip to content

Commit

Permalink
Restructure the project (#6)
Browse files Browse the repository at this point in the history
* Restructure the project

* fmt

* add ci checks

* final touches

* artifacts

* fix clippy
  • Loading branch information
Szegoo authored Dec 23, 2023
1 parent 2f4c0fc commit 6e5c9b2
Show file tree
Hide file tree
Showing 22 changed files with 1,139 additions and 746 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,35 @@ jobs:

- name: Ensure the rust code is formatted
run: cargo fmt --all --check

clippy:
needs: install
runs-on: ubuntu-latest
steps:
- name: Use cashed cargo
uses: actions/cache@v3
with:
path: ~/.cargo
key: ${{ runner.os }}-rust-${{ hashFiles('rust-toolchain.toml') }}

- name: Checkout the source code
uses: actions/checkout@v3

- name: Ensure clippy is happy
run: cargo clippy -- -D warnings

build:
needs: install
runs-on: ubuntu-latest
steps:
- name: Use cashed cargo
uses: actions/cache@v3
with:
path: ~/.cargo
key: ${{ runner.os }}-rust-${{ hashFiles('rust-toolchain.toml') }}

- name: Checkout the source code
uses: actions/checkout@v3

- name: Ensure the project builds
run: cargo build
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/target
/artifacts
/out
parachains.json
parachains.json
24 changes: 24 additions & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Basic
edition = "2021"
hard_tabs = true
max_width = 100
use_small_heuristics = "Max"
# Imports
imports_granularity = "Crate"
reorder_imports = true
# Consistency
newline_style = "Unix"
# Misc
chain_width = 80
spaces_around_ranges = false
binop_separator = "Back"
reorder_impl_items = false
match_arm_leading_pipes = "Preserve"
match_arm_blocks = false
match_block_trailing_comma = true
trailing_comma = "Vertical"
trailing_semicolon = false
use_field_init_shorthand = true
# Format comments
comment_width = 100
wrap_comments = true
Loading

0 comments on commit 6e5c9b2

Please sign in to comment.