Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Commit

Permalink
chore: repo cleanup (#162)
Browse files Browse the repository at this point in the history
* format .github dir

* depbot entry for github actions

* use actions-rust-lang/setup-rust-toolchain

* use concurrency

* add spell and toml check

* fix grammar and spelling

* update typos config

* update taplo config

* format toml files

* nit on doc

* nit

* tab to space
  • Loading branch information
rnbguy authored May 23, 2024
1 parent 9cbeda8 commit 4a983c1
Show file tree
Hide file tree
Showing 48 changed files with 353 additions and 345 deletions.
38 changes: 19 additions & 19 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
[patch.crates-io]

sov-ibc = { path = "modules/sov-ibc" }
sov-ibc-transfer = { path = "modules/sov-ibc-transfer" }
sov-consensus-state-tracker = { path = "modules/sov-consensus-state-tracker" }
sov-celestia-client = { path = "clients/sov-celestia" }

ibc = { git = "https://github.com/cosmos/ibc-rs.git", rev = "d5e3887770" }
ibc-core = { git = "https://github.com/cosmos/ibc-rs.git", rev = "d5e3887770" }
ibc-core-client = { git = "https://github.com/cosmos/ibc-rs.git", rev = "d5e3887770" }
ibc-core-host-cosmos = { git = "https://github.com/cosmos/ibc-rs.git", rev = "d5e3887770" }
ibc-client-tendermint = { git = "https://github.com/cosmos/ibc-rs.git", rev = "d5e3887770" }
ibc-client-wasm-types = { git = "https://github.com/cosmos/ibc-rs.git", rev = "d5e3887770" }
ibc-client-cw = { git = "https://github.com/cosmos/ibc-rs.git", rev = "d5e3887770" }
ibc-app-transfer = { git = "https://github.com/cosmos/ibc-rs.git", rev = "d5e3887770" }
ibc-primitives = { git = "https://github.com/cosmos/ibc-rs.git", rev = "d5e3887770" }
ibc-query = { git = "https://github.com/cosmos/ibc-rs.git", rev = "d5e3887770" }
ibc-testkit = { git = "https://github.com/cosmos/ibc-rs.git", rev = "d5e3887770" }

basecoin = { git = "https://github.com/informalsystems/basecoin-rs.git", rev = "61256f9" }
jmt = { git = "https://github.com/penumbra-zone/jmt.git", rev = "1d007e11cb68aa5ca13e9a5af4a12e6439d5f7b6" }
sov-ibc = { path = "modules/sov-ibc" }
sov-ibc-transfer = { path = "modules/sov-ibc-transfer" }
sov-consensus-state-tracker = { path = "modules/sov-consensus-state-tracker" }
sov-celestia-client = { path = "clients/sov-celestia" }

ibc = { git = "https://github.com/cosmos/ibc-rs.git", rev = "d5e3887770" }
ibc-core = { git = "https://github.com/cosmos/ibc-rs.git", rev = "d5e3887770" }
ibc-core-client = { git = "https://github.com/cosmos/ibc-rs.git", rev = "d5e3887770" }
ibc-core-host-cosmos = { git = "https://github.com/cosmos/ibc-rs.git", rev = "d5e3887770" }
ibc-client-tendermint = { git = "https://github.com/cosmos/ibc-rs.git", rev = "d5e3887770" }
ibc-client-wasm-types = { git = "https://github.com/cosmos/ibc-rs.git", rev = "d5e3887770" }
ibc-client-cw = { git = "https://github.com/cosmos/ibc-rs.git", rev = "d5e3887770" }
ibc-app-transfer = { git = "https://github.com/cosmos/ibc-rs.git", rev = "d5e3887770" }
ibc-primitives = { git = "https://github.com/cosmos/ibc-rs.git", rev = "d5e3887770" }
ibc-query = { git = "https://github.com/cosmos/ibc-rs.git", rev = "d5e3887770" }
ibc-testkit = { git = "https://github.com/cosmos/ibc-rs.git", rev = "d5e3887770" }

basecoin = { git = "https://github.com/informalsystems/basecoin-rs.git", rev = "61256f9" }
jmt = { git = "https://github.com/penumbra-zone/jmt.git", rev = "1d007e11cb68aa5ca13e9a5af4a12e6439d5f7b6" }


# The sovereign-sdk patches are specified in two modes.
Expand Down
2 changes: 1 addition & 1 deletion .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ ignore:
# Make comments less noisy
comment:
layout: "files"
require_changes: true
require_changes: true
20 changes: 12 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
version: 2
updates:
- package-ecosystem: cargo
directory: "/"
schedule:
interval: weekly
day: monday
time: "15:00"
timezone: "Europe/Warsaw"
open-pull-requests-limit: 0
- package-ecosystem: cargo
directory: "/"
schedule:
interval: weekly
day: monday
time: "15:00"
timezone: "Europe/Warsaw"
open-pull-requests-limit: 0
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ Closes: #XXX
are the most critical to review.
-->

______
---

### PR author checklist

- [ ] Linked to GitHub issue.
- [ ] Added tests.
- [ ] Updated code comments and documentation (e.g., `docs/`).
- [ ] Tagged *one* reviewer who will be the one responsible for shepherding this PR.
- [ ] Tagged _one_ reviewer who will be the one responsible for shepherding this PR.
9 changes: 9 additions & 0 deletions .github/typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[default.extend-words]
# for serde serialization
ser = "ser"

[files]
extend-exclude = [ "**/*.bin" ]

[default]
extend-ignore-re = [ "cosmos1[0-9A-Za-z+/]{10,}", "ch[ABC][ABC]" ]
9 changes: 4 additions & 5 deletions .github/workflows/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
---
name: Bug Report
name: Bug Report
about: Create a report to help us squash bugs!

---

<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v ✰ Thanks for opening an issue! ✰
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v ✰ Thanks for opening an issue! ✰
v Before smashing the submit button please review the template.
v Please also ensure that this is not a duplicate issue :)
v Please also ensure that this is not a duplicate issue :)
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -->

## Bug Summary
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
---
name: Feature Request
about: Create a proposal to request a feature!

---

<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v ✰ Thanks for opening an issue! ✰
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v ✰ Thanks for opening an issue! ✰
v Before smashing the submit button please review the template.
v Word of caution: poorly thought-out proposals may be rejected
v without deliberation
v Word of caution: poorly thought-out proposals may be rejected
v without deliberation
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -->

## Feature Summary
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/ISSUE_TEMPLATE/process-improvement.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
---
name: Process Improvement
about: Create a proposal to suggest an improvement!

---

<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v ✰ Thanks for opening an issue! ✰
v ✰ Thanks for opening an issue! ✰
v Before smashing the submit button please review the template.
v Please also ensure that this is not a duplicate issue :)
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -->
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/code-quality.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Code Quality Checks
on:
pull_request:

jobs:
code-quality:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Spell Check with Typos
uses: crate-ci/[email protected]
with:
config: ./.github/typos.toml

- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: baptiste0928/cargo-install@v3
with:
crate: taplo-cli
- run: taplo fmt --check
6 changes: 1 addition & 5 deletions .github/workflows/cw-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,10 @@ jobs:
name: hermes-sdk
extraPullNames: informal-sovereign
- name: Install Rust
uses: actions-rs/toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
profile: minimal
override: true
- name: Cache Cargo registry
uses: Swatinem/rust-cache@v2
- name: Set up Git credentials for private repo
run: |
git config --global --replace-all \
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/dependency_review.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Dependency Review'
name: "Dependency Review"
on: [pull_request]

permissions:
Expand All @@ -8,9 +8,9 @@ jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
- name: "Checkout Repository"
uses: actions/checkout@v3
- name: 'Dependency Review'
- name: "Dependency Review"
uses: actions/dependency-review-action@v3
with:
fail-on-severity: critical
12 changes: 5 additions & 7 deletions .github/workflows/risc0-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ on:
paths:
- .github/workflows/risc0-check.yml
- ci/risc0-check/**
- '**/Cargo.toml'
- '**/Cargo.lock'
- "**/Cargo.toml"
- "**/Cargo.lock"
push:
branches: main
paths:
- .github/workflows/risc0-check.yml
- ci/risc0-check/**
- '**/Cargo.toml'
- '**/Cargo.lock'
- "**/Cargo.toml"
- "**/Cargo.lock"

env:
CARGO_INCREMENTAL: 0
Expand All @@ -31,8 +31,6 @@ jobs:
git config --global --replace-all \
"url.https://${{ secrets.AUTH_TOKEN }}@github.com.insteadOf" \
ssh://[email protected]
- name: Cache dependencies
uses: Swatinem/rust-cache@v2
- name: Install cargo-risczero
uses: taiki-e/install-action@v2
with:
Expand All @@ -42,4 +40,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check Risc0 compatibility
run: make check-risc0
run: make check-risc0
37 changes: 10 additions & 27 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,19 @@ env:
RUSTUP_MAX_RETRIES: 10
MSRV: 1.77

jobs:
cleanup-runs:
runs-on: ubuntu-latest
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: ${{ !startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main' }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main' }}

jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly # Since fmt uses unstable features for organizing imports
components: rustfmt
override: true
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/cargo@v1
with:
command: fmt
Expand All @@ -61,11 +55,9 @@ jobs:
"url.https://${{ secrets.AUTH_TOKEN }}@github.com.insteadOf" \
ssh://[email protected]
- uses: arduino/setup-protoc@v2
- uses: actions-rs/toolchain@v1
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ env.MSRV }}
override: true
- uses: Swatinem/rust-cache@v2
- name: Build with MSRV
uses: actions-rs/cargo@v1
with:
Expand All @@ -83,11 +75,9 @@ jobs:
"url.https://${{ secrets.AUTH_TOKEN }}@github.com.insteadOf" \
ssh://[email protected]
- uses: arduino/setup-protoc@v2
- uses: actions-rs/toolchain@v1
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/cargo@v1
with:
command: doc
Expand All @@ -103,12 +93,10 @@ jobs:
"url.https://${{ secrets.AUTH_TOKEN }}@github.com.insteadOf" \
ssh://[email protected]
- uses: arduino/setup-protoc@v2
- uses: actions-rs/toolchain@v1
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
components: clippy
override: true
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -124,12 +112,10 @@ jobs:
"url.https://${{ secrets.AUTH_TOKEN }}@github.com.insteadOf" \
ssh://[email protected]
- uses: arduino/setup-protoc@v2
- uses: actions-rs/toolchain@v1
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
components: clippy
override: true
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -146,11 +132,9 @@ jobs:
"url.https://${{ secrets.AUTH_TOKEN }}@github.com.insteadOf" \
ssh://[email protected]
- uses: arduino/setup-protoc@v2
- uses: actions-rs/toolchain@v1
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/cargo@v1
with:
command: test
Expand All @@ -159,4 +143,3 @@ jobs:
with:
command: test
args: --all-features --no-fail-fast --workspace -- --nocapture

Loading

0 comments on commit 4a983c1

Please sign in to comment.