-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: [email protected]
- Loading branch information
Showing
2 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Neurons Rust Checks | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
voting-check: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./neurons | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 | ||
with: | ||
workspaces: ./neurons | ||
cache-all-crates: true | ||
|
||
- name: Run tests | ||
run: | | ||
cargo test | ||
- name: Formatting check | ||
run: | | ||
cargo fmt --check | ||
- name: Lint with clippy | ||
run: | ||
cargo lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Voting Contract Checks | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
voting-check: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./contracts | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
targets: wasm32-unknown-unknown | ||
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 | ||
with: | ||
workspaces: ./contracts | ||
cache-all-crates: true | ||
|
||
- name: Install soroban cli | ||
run: | | ||
cargo install --locked --version 20.2.0 soroban-cli | ||
- name: Build contracts | ||
run: | | ||
soroban contract build | ||
- name: Run tests | ||
run: | | ||
cargo test | ||
- name: Formatting check | ||
run: | | ||
cargo fmt --check | ||
- name: Lint with clippy | ||
run: | ||
cargo lint |