[CI] Run proptests only on main #14
Workflow file for this run
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 cl vault | |
on: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'smart-contracts/contracts/cl-vault/Cargo.toml' | |
- 'smart-contracts/contracts/cl-vault/**.rs' | |
- 'smart-contracts/contracts/dex-router-osmosis/Cargo.toml' | |
- 'smart-contracts/contracts/dex-router-osmosis/**.rs' | |
- '.github/workflows/cl_vault.yml' | |
- '.github/workflows/rust_basic.yml' | |
push: | |
branches: | |
- main | |
paths: | |
- 'smart-contracts/contracts/cl-vault/Cargo.toml' | |
- 'smart-contracts/contracts/cl-vault/**.rs' | |
- 'smart-contracts/contracts/dex-router-osmosis/Cargo.toml' | |
- 'smart-contracts/contracts/dex-router-osmosis/**.rs' | |
- '.github/workflows/cl_vault.yml' | |
- '.github/workflows/rust_basic.yml' | |
workflow_dispatch: | |
jobs: | |
unit-test: | |
uses: ./.github/workflows/rust_basic.yml | |
with: | |
target: 'contracts/cl-vault' | |
test-tube: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Restore dependencies | |
uses: actions/cache/restore@v4 | |
with: | |
path: | | |
~/.cargo | |
~/go | |
**/target | |
key: ${{ runner.os }}-cargo-$GITHUB_SHA | |
restore-keys: ${{ runner.os }}-cargo | |
- name: Build dex-router-osmosis | |
run: cargo test-tube-build | |
working-directory: smart-contracts/contracts/dex-router-osmosis | |
- name: Build cl-vault | |
run: cargo test-tube-build | |
working-directory: smart-contracts/contracts/cl-vault | |
- name: Run test-tube tests | |
run: cargo test-tube | |
working-directory: smart-contracts/contracts/cl-vault | |
- name: Run fuzzer | |
if: github.ref == 'refs/heads/main' | |
run: cargo prop-test | |
env: | |
PROPTEST_CASES: 20 | |
working-directory: smart-contracts/contracts/cl-vault |