Skip to content

Commit

Permalink
Refactor CLI along with re-organizing app module and adding config fi…
Browse files Browse the repository at this point in the history
…le (#103)

* Reorganize app module and refactore CLI

* Add clippy-no-features to CI

* Fix rust.yml indentation

* Make BaseconCli commands global

* Fix default_app_runner

* add unclog + some error refinement + revise CI

* Add actions/checkout for cache.yml

* include actions/cache in rust.yml

* Apply some refinements
  • Loading branch information
Farhad-Shabani authored May 31, 2023
1 parent 02c9680 commit 74bc740
Show file tree
Hide file tree
Showing 32 changed files with 1,683 additions and 959 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Make `app` module more maintainable by re-organizing the code
([#104](https://github.com/informalsystems/basecoin-rs/issues/104))
2 changes: 2 additions & 0 deletions .changelog/unreleased/breaking-changes/105-refactor-cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Refactor CLI using `clap` to get more extensible
([#105](https://github.com/informalsystems/basecoin-rs/issues/105))
2 changes: 2 additions & 0 deletions .changelog/unreleased/breaking-changes/13-add-config-file.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Making the app user-configurable by including a config file
([#13](https://github.com/informalsystems/basecoin-rs/issues/13))
33 changes: 31 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,46 @@ jobs:
args: --all -- --check

# This job creates the "clippy-results" GitHub Action that lists the clippy results in a nice format.
clippy-json-output:
clippy-no-features:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo
target
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-rust-
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
override: true
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --lib -- -Dwarnings -Drust-2018-idioms

clippy-all-features:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo
target
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-rust-
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
override: true
- uses: actions-rs/clippy-check@v1
with:
name: clippy-results
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --all-targets -- -Dwarnings -Drust-2018-idioms
9 changes: 8 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo
target
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-rust-
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: test
args: --all-features

ibc-integration:
runs-on: ubuntu-latest
Expand Down
Loading

0 comments on commit 74bc740

Please sign in to comment.