Skip to content

Commit 17afe2e

Browse files
authored
add rust workspace and update crates version (#41)
* add workspace cargo.toml * update * fix transfer token * fmt code * update * fix clippy * fix fmt * add ci
1 parent 8e87305 commit 17afe2e

File tree

196 files changed

+4854
-1661
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

196 files changed

+4854
-1661
lines changed

.github/dependabot.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "cargo"
4+
directory: "/"
5+
schedule:
6+
interval: weekly
7+
# ignore:
8+
# # these need to be updated together, so dependabot PRs
9+
# # are just noise. So, ignore them:
10+
# - dependency-name: sp-core
11+
# - dependency-name: sp-keyring
12+
# - dependency-name: sp-runtime
13+
# - dependency-name: sp-core-hashing
14+
# - dependency-name: sp-version
15+
- package-ecosystem: github-actions
16+
directory: '/'
17+
schedule:
18+
interval: weekly

.github/workflows/rust.yml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# The name of your workflow. GitHub displays the names of your workflows on your repository's "Actions" tab
2+
name: Rust
3+
4+
# To automatically trigger the workflow
5+
on:
6+
# NB: this differs from the book's project!
7+
# These settings allow us to run this specific CI pipeline for PRs against
8+
# this specific branch (a.k.a. book chapter).
9+
push:
10+
branches:
11+
- main
12+
pull_request:
13+
types: [ opened, synchronize, reopened ]
14+
branches:
15+
- main
16+
17+
# A workflow run is made up of one or more jobs, which run in parallel by default
18+
# Each job runs in a runner environment specified by runs-on
19+
jobs:
20+
# Unique identifier of our job (`job_id`)
21+
test:
22+
# Sets the name `Test` for the job, which is displayed in the GitHub UI
23+
name: Test
24+
# Containers must run in Linux based operating systems
25+
runs-on: ubuntu-latest
26+
steps:
27+
# Downloads a copy of the code in your repository before running CI tests
28+
- name: Check out repository code
29+
# The uses keyword specifies that this step will run v3 of the actions/checkout action.
30+
# This is an action that checks out your repository onto the runner, allowing you to run scripts or other actions against your code (such as build and test tools).
31+
# You should use the checkout action any time your workflow will run against the repository's code.
32+
uses: actions/checkout@v3
33+
34+
# This GitHub Action installs a Rust toolchain using rustup. It is designed for one-line concise usage and good defaults.
35+
- name: Install the Rust toolchain
36+
uses: dtolnay/rust-toolchain@stable
37+
38+
- name: Run tests
39+
run: cargo test
40+
41+
# `fmt` container job
42+
fmt:
43+
name: Rustfmt
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v3
47+
- uses: dtolnay/rust-toolchain@stable
48+
with:
49+
# Specific to dtolnay/rust-toolchain: Comma-separated string of additional components to install
50+
components: rustfmt
51+
- name: Enforce formatting
52+
run: cargo fmt --check
53+
54+
# `clippy` container job
55+
clippy:
56+
name: Clippy
57+
runs-on: ubuntu-latest
58+
steps:
59+
- uses: actions/checkout@v3
60+
- uses: dtolnay/rust-toolchain@stable
61+
with:
62+
components: clippy
63+
- name: Linting
64+
run: cargo clippy -- -D warnings

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@ test-ledger/
1414
**/*.rs.bk
1515
**/*/test-ledger
1616
**/*/yarn.lock
17+
18+
/target

0 commit comments

Comments
 (0)