Skip to content

Commit

Permalink
Trigger cl-vault test-tube on dex-router-osmosis changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lubkoll committed Jul 18, 2024
1 parent 739543e commit 2fac729
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 18 deletions.
31 changes: 28 additions & 3 deletions .github/workflows/cl_vault.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
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'
push:
branches:
- main
Expand All @@ -18,6 +20,29 @@ jobs:
with:
target: 'contracts/cl-vault'
test-tube:
uses: ./.github/workflows/rust_test_tube.yml
with:
contract: 'cl-vault'
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@v4
with:
path: |
~/.cargo
~/go
**/target
key: ${{ runner.os }}-cargo-$${{ hashFiles('smart-contracts/Cargo.lock') }}
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
env:
PROPTEST_CASES: 10
working-directory: smart-contracts/contracts/cl-vault
4 changes: 2 additions & 2 deletions .github/workflows/rust_basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
uses: technote-space/[email protected]
with:
PATTERNS: |
**/**.rs
**/Cargo.lock
${{inputs.contract}}/**.rs
${{inputs.contract}}/Cargo.toml
- name: Install Rust
if: env.GIT_DIFF
uses: dtolnay/rust-toolchain@stable
Expand Down
14 changes: 1 addition & 13 deletions .github/workflows/rust_test_tube.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,9 @@ jobs:
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Get git diff
uses: technote-space/[email protected]
with:
PATTERNS: |
**/**.rs
**/Cargo.lock
- name: Install Rust
if: env.GIT_DIFF
uses: dtolnay/rust-toolchain@stable
- name: Restore dependencies
if: env.GIT_DIFF
uses: actions/cache@v4
with:
path: |
Expand All @@ -32,13 +24,9 @@ jobs:
**/target
key: ${{ runner.os }}-cargo-$${{ hashFiles('smart-contracts/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo
- name: Build test-tube tests
if: env.GIT_DIFF
- name: Build ${{ inputs.contract }}
run: cargo test-tube-build
working-directory: smart-contracts/contracts/${{ inputs.contract }}
- name: Run test-tube tests
if: env.GIT_DIFF
run: cargo test-tube
env:
PROPTEST_CASES: 10
working-directory: smart-contracts/contracts/${{ inputs.contract }}
1 change: 1 addition & 0 deletions smart-contracts/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions smart-contracts/contracts/cl-vault/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ num_enum = { workspace = true }
apollo-cw-asset = { workspace = true }
dex-router-osmosis = {workspace = true}
cw-vault-multi-standard = {git = "https://github.com/quasar-finance/cw-vault-standard", branch ="master", features = ["lockup", "force-unlock"]}
const_format = { workspace = true }

[dev-dependencies]
osmosis-test-tube = { workspace = true }
Expand Down

0 comments on commit 2fac729

Please sign in to comment.