Skip to content

feat: implement multi-period-revenue-deposit #385

feat: implement multi-period-revenue-deposit

feat: implement multi-period-revenue-deposit #385

Workflow file for this run

name: CI
on:
push:
branches: [main, master, develop]
pull_request:
branches: [main, master, develop]
workflow_dispatch:
inputs:
toolchain:
description: "Rust toolchain version"
required: true
default: "stable"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
toolchain: stable
jobs:
test:
name: Build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy, rustfmt
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml', '**/src/**') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Check formatting
run: cargo fmt --all -- --check || (cargo fmt --all && echo "FORMAT_FIXED=true" >> $GITHUB_ENV)
- name: Commit formatting changes
if: env.FORMAT_FIXED == 'true' && github.event_name != 'pull_request'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: auto-format code"
file_pattern: "src/*.rs"
- name: Clippy
run: cargo clippy --all-targets -- -D warnings
- name: Build
run: cargo build --release
- name: Test
run: cargo test -- --test-threads=1
env:
RUST_BACKTRACE: full