-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
164 additions
and
106 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: Test Tube (osmosis) | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
unittest: | ||
required: false | ||
default: false | ||
type: boolean | ||
proptest: | ||
required: false | ||
default: false | ||
type: boolean | ||
store_deps: | ||
required: false | ||
default: false | ||
type: boolean | ||
workflow_dispatch: | ||
|
||
env: | ||
RUSTC_WRAPPER: cachepot | ||
|
||
jobs: | ||
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 | ||
id: restore-cache | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: | | ||
~/.cache/cachepot | ||
~/.cargo | ||
~/go | ||
smart-contracts/osmosis/**/target | ||
key: ${{ runner.os }}-cargo-test3-osmosis-${{github.sha}} | ||
restore-keys: ${{ runner.os }}-cargo-test3-osmosis | ||
- name: Update PATH and RUSTC_WRAPPER | ||
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH | ||
- name: Install cachepot | ||
run: test -e $HOME/.cargo/bin/cachepot && echo "cachepot found -- skipping install" || cargo install --git https://github.com/paritytech/cachepot | ||
- name: Rust lint | ||
run: cargo clippy --features test-tube --all-targets -- -D warnings | ||
working-directory: smart-contracts/osmosis | ||
- if: inputs.unittest | ||
name: Unit tests | ||
run: cargo unit-test | ||
working-directory: smart-contracts/osmosis | ||
- name: Build merkle-incentives | ||
run: cargo test-tube-build | ||
working-directory: smart-contracts/osmosis/contracts/merkle-incentives | ||
- name: Test merkle-incentives | ||
run: cargo test-tube | ||
working-directory: smart-contracts/osmosis/contracts/merkle-incentives | ||
- name: Build dex-router-osmosis | ||
run: cargo test-tube-build | ||
working-directory: smart-contracts/osmosis/contracts/dex-router-osmosis | ||
- name: Test dex-router-osmosis | ||
run: cargo test-tube | ||
working-directory: smart-contracts/osmosis/contracts/dex-router-osmosis | ||
- name: Build cl-vault | ||
run: cargo test-tube-build | ||
working-directory: smart-contracts/osmosis/contracts/cl-vault | ||
- name: Test cl-vault | ||
run: cargo test-tube | ||
working-directory: smart-contracts/osmosis/contracts/cl-vault | ||
- if: inputs.proptest | ||
name: Run prop-test | ||
run: cargo prop-test | ||
env: | ||
PROPTEST_CASES: 10 | ||
working-directory: smart-contracts/osmosis/contracts/cl-vault | ||
- name: Store dependencies | ||
if: inputs.store_deps | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: | | ||
~/.cache/cachepot | ||
~/.cargo | ||
~/go | ||
smart-contracts/${{ inputs.workspace }}/**/target | ||
key: ${{ runner.os }}-cargo-test3-${{ inputs.workspace }}-${{github.sha}} | ||
|
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
This file was deleted.
Oops, something went wrong.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Test Tube (osmosis) | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- 'smart-contracts/osmosis/contracts/dex-router-osmosis/Cargo.toml' | ||
- 'smart-contracts/osmosis/contracts/dex-router-osmosis/**.rs' | ||
- 'smart-contracts/osmosis/contracts/cl-vault/Cargo.toml' | ||
- 'smart-contracts/osmosis/contracts/cl-vault/**.rs' | ||
- 'smart-contracts/osmosis/contracts/merkle-incentives/Cargo.toml' | ||
- 'smart-contracts/osmosis/contracts/merkle-incentives/**.rs' | ||
- '.github/workflows/dex_router_osmosis.yml' | ||
- '.github/workflows/cl_vault_osmosis.yml' | ||
- '.github/workflows/merkle_incentives_osmosis.yml' | ||
- '.github/workflows/test_tube_osmosis.yml' | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'smart-contracts/osmosis/contracts/dex-router-osmosis/Cargo.toml' | ||
- 'smart-contracts/osmosis/contracts/dex-router-osmosis/**.rs' | ||
- 'smart-contracts/osmosis/contracts/cl-vault/Cargo.toml' | ||
- 'smart-contracts/osmosis/contracts/cl-vault/**.rs' | ||
- 'smart-contracts/osmosis/contracts/merkle-incentives/Cargo.toml' | ||
- 'smart-contracts/osmosis/contracts/merkle-incentives/**.rs' | ||
- '.github/workflows/dex_router_osmosis.yml' | ||
- '.github/workflows/cl_vault_osmosis.yml' | ||
- '.github/workflows/merkle_incentives_osmosis.yml' | ||
- '.github/workflows/test_tube_osmosis.yml' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
post-merge: | ||
uses: ./.github/workflows/all_checks_osmosis.yml | ||
if: github.event_name == 'push' | ||
with: | ||
unittest: true | ||
proptest: true | ||
store_deps: true | ||
pre-commit: | ||
uses: ./.github/workflows/all_checks_osmosis.yml | ||
if: github.event_name == 'pull_request' |
This file was deleted.
Oops, something went wrong.