Skip to content

Use GITHUB_SHA instead of hash of Cargo.lock for build caches (#672) #13

Use GITHUB_SHA instead of hash of Cargo.lock for build caches (#672)

Use GITHUB_SHA instead of hash of Cargo.lock for build caches (#672) #13

Workflow file for this run

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/**.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/**.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
env:
PROPTEST_CASES: 10
working-directory: smart-contracts/contracts/cl-vault