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] Clear temporary test-tube files after running test-tube #680

Merged
merged 3 commits into from
Jul 19, 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
30 changes: 4 additions & 26 deletions .github/workflows/cl_vault.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,7 @@ jobs:
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
env:
PROPTEST_CASES: 10
working-directory: smart-contracts/contracts/cl-vault
uses: ./.github/workflows/rust_test_tube.yml
with:
contract: 'cl-vault'
dex_router_osmosis: true
12 changes: 12 additions & 0 deletions .github/workflows/rust_test_tube.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
contract:
required: true
type: string
dex_router_osmosis:
required: false
default: false
type: boolean

jobs:
test-tube:
Expand All @@ -27,6 +31,14 @@ jobs:
- name: Build ${{ inputs.contract }}
run: cargo test-tube-build
working-directory: smart-contracts/contracts/${{ inputs.contract }}
- name: Build dex-router-osmosis
if: ${{inputs.dex_router_osmosis}}
run: cargo test-tube-build
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: Clear temporary test-tube files
if: always()
run: rm -rf .osmosis-test-tube-temp-*
working-directory: /tmp
Loading