Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Run proptests only on main #673

Merged
merged 7 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/cl_vault.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ on:
- 'smart-contracts/contracts/cl-vault/**.rs'
- 'smart-contracts/contracts/dex-router-osmosis/Cargo.toml'
- 'smart-contracts/contracts/dex-router-osmosis/**.rs'
- '.github/workflows/**.yml'
- '.github/workflows/cl_vault.yml'
- '.github/workflows/rust_basic.yml'
push:
branches:
- main
Expand All @@ -18,7 +19,8 @@ on:
- 'smart-contracts/contracts/cl-vault/**.rs'
- 'smart-contracts/contracts/dex-router-osmosis/Cargo.toml'
- 'smart-contracts/contracts/dex-router-osmosis/**.rs'
- '.github/workflows/**.yml'
- '.github/workflows/cl_vault.yml'
- '.github/workflows/rust_basic.yml'
workflow_dispatch:

jobs:
Expand All @@ -31,3 +33,4 @@ jobs:
with:
contract: 'cl-vault'
dex_router_osmosis: true
prop_test: ${{ github.ref == 'refs/heads/main' }}
8 changes: 7 additions & 1 deletion .github/workflows/rust_test_tube.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ on:
type: string
dex_router_osmosis:
required: false
default: false
type: boolean
prop_test:
required: false
type: boolean

jobs:
Expand Down Expand Up @@ -37,6 +39,10 @@ jobs:
working-directory: smart-contracts/contracts/dex-router-osmosis
- name: Run test-tube tests
run: cargo test-tube
working-directory: smart-contracts/contracts/${{ inputs.contract }}
- name: Run prop-test
if: inputs.prop_test
run: cargo prop-test
env:
PROPTEST_CASES: 10
working-directory: smart-contracts/contracts/${{ inputs.contract }}
Expand Down
3 changes: 2 additions & 1 deletion smart-contracts/contracts/cl-vault/.cargo/config
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
wasm = "build --release --lib --target wasm32-unknown-unknown"
unit-test = "test --lib"
schema = "run --bin schema"
test-tube = "test --test * --features test-tube -- --include-ignored --test-threads=1"
test-tube = "test --test * --features test-tube -- --test-threads=1"
prop-test = "test tests::proptest::test_complete_works --lib -- --test-threads=1 --exact"
test-tube-build = "build --release --lib --target wasm32-unknown-unknown --target-dir ./test-tube-build"
Loading