Skip to content

Commit

Permalink
[CI] Add workflow for quasar-types (#670)
Browse files Browse the repository at this point in the history
  • Loading branch information
lubkoll authored Jul 18, 2024
1 parent 11b9ebe commit 97fb2e3
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cl_vault.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
unit-test:
uses: ./.github/workflows/rust_basic.yml
with:
contract: 'cl-vault'
target: 'contracts/cl-vault'
test-tube:
uses: ./.github/workflows/rust_test_tube.yml
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dex_router_osmosis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
unit-test:
uses: ./.github/workflows/rust_basic.yml
with:
contract: 'dex-router-osmosis'
target: 'contracts/dex-router-osmosis'
test-tube:
uses: ./.github/workflows/rust_test_tube.yml
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lst_adapter_osmosis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
unit-test:
uses: ./.github/workflows/rust_basic.yml
with:
contract: 'lst-adapter-osmosis'
target: 'contract/lst-adapter-osmosis'
2 changes: 1 addition & 1 deletion .github/workflows/lst_dex_adapter_osmosis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
unit-test:
uses: ./.github/workflows/rust_basic.yml
with:
contract: 'lst-dex-adapter-osmosis'
target: 'contract/lst-dex-adapter-osmosis'
2 changes: 1 addition & 1 deletion .github/workflows/merkle_incentives.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
unit-test:
uses: ./.github/workflows/rust_basic.yml
with:
contract: 'merkle-incentives'
target: 'contract/merkle-incentives'
test-tube:
uses: ./.github/workflows/rust_test_tube.yml
with:
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/quasar_types.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Test quasar-types

on:
pull_request:
branches:
- main
paths:
- 'smart-contracts/packages/quasar-types/**'
push:
branches:
- main
workflow_dispatch:

jobs:
unit-test:
uses: ./.github/workflows/rust_basic.yml
with:
target: 'packages/quasar-types'
2 changes: 1 addition & 1 deletion .github/workflows/range_middleware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
unit-test:
uses: ./.github/workflows/rust_basic.yml
with:
contract: 'range-middleware'
target: 'contract/range-middleware'
8 changes: 4 additions & 4 deletions .github/workflows/rust_basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Unit Test (rust)
on:
workflow_call:
inputs:
contract:
target:
required: true
type: string

Expand Down Expand Up @@ -35,12 +35,12 @@ jobs:
- name: Rust lint
if: env.GIT_DIFF
run: RUSTFLAGS="-Dwarnings" cargo clippy --workspace -- -D warnings --A deprecated
working-directory: smart-contracts/contracts/${{ inputs.contract }}
working-directory: smart-contracts/${{ inputs.target }}
- name: Rust format check
if: env.GIT_DIFF
run: cargo fmt --all -- --check
working-directory: smart-contracts/contracts/${{ inputs.contract }}
working-directory: smart-contracts/${{ inputs.target }}
- name: Run unit-tests
if: env.GIT_DIFF
run: cargo unit-test
working-directory: smart-contracts/contracts/${{ inputs.contract }}
working-directory: smart-contracts/${{ inputs.target }}
2 changes: 1 addition & 1 deletion .github/workflows/token_burner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
unit-test:
uses: ./.github/workflows/rust_basic.yml
with:
contract: 'token-burner'
target: 'contract/token-burner'
12 changes: 0 additions & 12 deletions smart-contracts/packages/quasar-types/CHANGELOG.md

This file was deleted.

3 changes: 2 additions & 1 deletion smart-contracts/packages/quasar-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ cw20 = { workspace = true }
cosmos-sdk-proto = { workspace = true }
serde-json-wasm = { workspace = true }
serde_json = { workspace = true }

derive_more = {version = "0.99.17", default-features = false, features = [
"display",
]}
rust_decimal = "1.24.0"

[dev-dependencies]
serde_test = "1.0"

0 comments on commit 97fb2e3

Please sign in to comment.