Add get protocol fee #48
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
name: test | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
decimal: | |
name: Test decimal dependency | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v3 | |
- name: Test decimal | |
run: | | |
cd src/decimal && cargo test | |
- name: Test decimal core | |
run: | | |
cd src/decimal/decimal_core && cargo test | |
linting: | |
name: Linting (fmt + clippy) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v3 | |
- name: Add rustfmt clippy components | |
run: | | |
rustup component add rustfmt clippy | |
- name: Run cargo fmt | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
- name: Run clippy | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --all-targets -- --no-deps -D warnings | |
tests: | |
name: Tests (uint + e2e) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v3 | |
- name: Cache Crates | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cargo | |
key: | | |
${{ runner.os }}-cargo-odra-${{ hashFiles('rust-toolchain.toml') }} | |
- name: Install Rust toolchain | |
run: | | |
rustup target add wasm32-unknown-unknown | |
- name: Install cargo odra | |
uses: actions-rs/cargo@v1 | |
with: | |
command: install | |
args: cargo-odra --locked | |
- name: Run unit tests | |
uses: actions-rs/cargo@v1 | |
with: | |
command: odra | |
args: test | |
build: | |
name: Build contract | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v3 | |
- name: Cache Crates | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cargo | |
key: | | |
${{ runner.os }}-cargo-odra-${{ hashFiles('rust-toolchain.toml') }} | |
- name: Install WABT | |
run: | | |
sudo apt install wabt | |
- name: Install Rust toolchain | |
run: | | |
rustup target add wasm32-unknown-unknown | |
- name: Add rustfmt component | |
run: | | |
rustup component add rustfmt | |
- name: Install cargo odra | |
uses: actions-rs/cargo@v1 | |
with: | |
command: install | |
args: cargo-odra --locked | |
- name: Build contract with casper backend | |
uses: actions-rs/cargo@v1 | |
with: | |
command: odra | |
args: build -b casper |