Skip to content

Commit

Permalink
BLOCKCHAIN-463 - Judiciary Phase 1
Browse files Browse the repository at this point in the history
  • Loading branch information
kacperzuk-neti committed Jun 21, 2024
1 parent 57e9c3e commit d05db42
Show file tree
Hide file tree
Showing 27 changed files with 8,883 additions and 253 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/check-formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,8 @@ jobs:
key: ${{ runner.os }}-cargo-rust-${{ hashFiles('**/Cargo.lock') }}

- name: Format code with rustfmt
run: cargo fmt --check -p pallet-liberland-initializer -p pallet-liberland-legislation -p liberland-traits -p pallet-llm -p pallet-office -p pallet-registry -p pallet-custom-account -p pallet-contracts-registry
run: cargo fmt --check -p pallet-liberland-initializer -p pallet-liberland-legislation -p liberland-traits -p pallet-llm -p pallet-office -p pallet-registry -p pallet-custom-account -p pallet-contracts-registry -p liberland-extension -p liberland-extension-runtime

- name: Format code with rustfmt
working-directory: contracts/
run: cargo fmt --check
41 changes: 41 additions & 0 deletions .github/workflows/test-contracts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Run contracts tests

on:
pull_request:
workflow_dispatch:
push:
branches:
- develop
- main

jobs:
test:
runs-on: ubuntu-latest
env:
RUSTFLAGS: "-C debug-assertions=y"
RUST_BACKTRACE: 1
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}

- name: Install Rust toolchain
run: |
rustup set profile minimal
rustup update --no-self-update 1.78.0
rustup component add --toolchain 1.78.0 rustfmt rust-src
rustup target add wasm32-unknown-unknown
rustup default 1.78.0
- name: Checkout
uses: actions/checkout@v4

- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
workspaces: "contracts -> contracts/target"

- name: Run tests
working-directory: contracts
run: cargo test
Loading

0 comments on commit d05db42

Please sign in to comment.