0e0151f781
* Profit margin percent to config, fix vesting tests * Add bonding bounds check * Fix contract test
64 lines
1.8 KiB
YAML
64 lines
1.8 KiB
YAML
name: Contracts
|
|
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- 'explorer/**'
|
|
pull_request:
|
|
paths-ignore:
|
|
- 'explorer/**'
|
|
|
|
jobs:
|
|
matrix_prep:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
|
steps:
|
|
# creates the matrix strategy from build_matrix_includes.json
|
|
- uses: actions/checkout@v2
|
|
- id: set-matrix
|
|
uses: JoshuaTheMiller/conditional-build-matrix@main
|
|
with:
|
|
inputFile: '.github/workflows/contract_matrix_includes.json'
|
|
filter: '[?runOnEvent==`${{ github.event_name }}` || runOnEvent==`always`]'
|
|
contracts:
|
|
# since it's going to be compiled into wasm, there's absolutely
|
|
# no point in running CI on different OS-es
|
|
runs-on: ubuntu-latest
|
|
continue-on-error: ${{ matrix.rust == 'nightly' }}
|
|
needs: matrix_prep
|
|
strategy:
|
|
matrix: ${{fromJson(needs.matrix_prep.outputs.matrix)}}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: ${{ matrix.rust }}
|
|
target: wasm32-unknown-unknown
|
|
override: true
|
|
components: rustfmt, clippy
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
env:
|
|
RUSTFLAGS: '-C link-arg=-s'
|
|
with:
|
|
command: build
|
|
args: --manifest-path contracts/Cargo.toml --all --target wasm32-unknown-unknown
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --manifest-path contracts/Cargo.toml
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
with:
|
|
command: fmt
|
|
args: --manifest-path contracts/Cargo.toml --all -- --check
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
if: ${{ matrix.rust != 'nightly' }}
|
|
with:
|
|
command: clippy
|
|
args: --manifest-path contracts/Cargo.toml --all -- -D warnings |