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 20, 2024
1 parent 2e704fe commit 8dd2b2b
Show file tree
Hide file tree
Showing 27 changed files with 8,564 additions and 232 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/check-formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,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 -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
16 changes: 8 additions & 8 deletions .github/workflows/fork-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ jobs:
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y build-essential git clang curl libssl-dev llvm libudev-dev make protobuf-compiler pkg-config git-restore-mtime moreutils

- name: Install rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
default: true
target: wasm32-unknown-unknown
components: rustfmt, clippy

- 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
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@ jobs:
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y build-essential git clang curl libssl-dev llvm libudev-dev make protobuf-compiler pkg-config git-restore-mtime

- name: Install rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
default: true
target: wasm32-unknown-unknown
components: rustfmt, clippy
- 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
# this is needed to make sure that cargo uses the cached target files,
# which will have an older date than the checked out source code.
Expand Down
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
15 changes: 7 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,13 @@ jobs:
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y build-essential git clang curl libssl-dev llvm libudev-dev make protobuf-compiler pkg-config git-restore-mtime

- name: Install rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
default: true
target: wasm32-unknown-unknown
components: rustfmt, clippy
- 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
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/try-runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,13 @@ jobs:
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y build-essential git clang curl libssl-dev llvm libudev-dev make protobuf-compiler pkg-config git-restore-mtime

- name: Install rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
default: true
target: wasm32-unknown-unknown
components: rustfmt, clippy
- 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
Expand Down
Loading

0 comments on commit 8dd2b2b

Please sign in to comment.