Skip to content

Commit

Permalink
Migrate code to new repo (#1)
Browse files Browse the repository at this point in the history
* Migrate contracts to new repo

Co-authored-by: Igor Dzierwa <[email protected]>

* Migrate neurons to new repo

Co-authored-by: Igor Dzierwa <[email protected]>

* Migrate checks to new repo

Co-authored-by: Igor Dzierwa <[email protected]>

---------

Co-authored-by: Igor Dzierwa <[email protected]>
  • Loading branch information
cptartur and igordzierwa authored May 8, 2024
1 parent b1e9a01 commit 24ed46d
Show file tree
Hide file tree
Showing 38 changed files with 3,916 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/neurons-rust-checks.yml
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
41 changes: 41 additions & 0 deletions .github/workflows/voting-checks.yml
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.idea
target

**/test_snapshots/**
2 changes: 2 additions & 0 deletions contracts/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[alias]
lint = "clippy --all-targets --all-features -- -W clippy::pedantic -A clippy::missing_errors_doc -A clippy::missing_panics_doc -A clippy::module_name_repetitions -A clippy::must_use_candidate"
Loading

0 comments on commit 24ed46d

Please sign in to comment.