Skip to content

Commit

Permalink
add contracts pallet (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
fbielejec committed Jun 14, 2023
1 parent 21658a3 commit f4c6396
Show file tree
Hide file tree
Showing 12 changed files with 604 additions and 51 deletions.
46 changes: 33 additions & 13 deletions .github/workflows/unit-tests-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ on:

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: false
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always

# TODO: refactor common steps into a workflow
jobs:
unit-test-suite:

basic-checks:
runs-on: ubuntu-latest

steps:

- name: Install protoc compiler
Expand All @@ -37,23 +37,43 @@ jobs:
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
/tmp/academy-pow/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-v1

- name: Install Rust toolchain
uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v1

- name: Run fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all
run: make fmt

- name: Run clippy
uses: actions-rs/cargo@v1
run: make clippy

unit-tests:
runs-on: ubuntu-latest
steps:

- name: Install protoc compiler
shell: bash
run: |
sudo apt-get install -y protobuf-compiler
- name: Checkout Source code
uses: actions/checkout@v3

- name: Cache cargo
uses: actions/cache@v3
with:
command: clippy
args: --all-targets -- --no-deps -D warnings
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
/tmp/academy-pow/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-v1

- name: Install Rust toolchain
uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v1

- name: Run tests
run: cargo test --verbose
run: make test
Loading

0 comments on commit f4c6396

Please sign in to comment.