Skip to content

Commit

Permalink
Add workflows for remaining contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
lubkoll committed Jul 17, 2024
1 parent 3243417 commit b208d99
Show file tree
Hide file tree
Showing 9 changed files with 92 additions and 34 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/cl_vault.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Test cl vault

on:
pull_request:
branches:
- main
paths:
- 'smart-contracts/contracts/cl-vault/**'
push:
branches:
- main
workflow_dispatch:

jobs:
unit-test:
uses: ./.github/workflows/rust_basic.yml
with:
contract: 'cl-vault'
25 changes: 1 addition & 24 deletions .github/workflows/lint.yml → .github/workflows/lint_go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,27 +39,4 @@ jobs:
run: go version
- name: Go lint
if: env.GIT_DIFF
run: make lint
lint-rust:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Get git diff
uses: technote-space/[email protected]
with:
PATTERNS: |
**/**.rs
Makefile
- name: Install Rust
if: env.GIT_DIFF
uses: dtolnay/rust-toolchain@stable
- name: Show versions
if: env.GIT_DIFF
run: rustc -V && cargo -V
- name: Rust lint
if: env.GIT_DIFF
run: cd smart-contracts && RUSTFLAGS="-Dwarnings" cargo clippy --workspace -- -D warnings --A deprecated
- name: Rust format check
if: env.GIT_DIFF
run: cd smart-contracts && cargo fmt --all -- --check
run: make lint
18 changes: 18 additions & 0 deletions .github/workflows/lst_adapter_osmosis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Test lst adapter (osmosis)

on:
pull_request:
branches:
- main
paths:
- 'smart-contracts/contracts/lst-adapter-osmosis/**'
push:
branches:
- main
workflow_dispatch:

jobs:
unit-test:
uses: ./.github/workflows/rust_basic.yml
with:
contract: 'lst-adapter-osmosis'
18 changes: 18 additions & 0 deletions .github/workflows/lst_dex_adapter_osmosis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Test lst dex adapter (osmosis)

on:
pull_request:
branches:
- main
paths:
- 'smart-contracts/contracts/lst-dex-adapter-osmosis/**'
push:
branches:
- main
workflow_dispatch:

jobs:
unit-test:
uses: ./.github/workflows/rust_basic.yml
with:
contract: 'lst-dex-adapter-osmosis'
18 changes: 18 additions & 0 deletions .github/workflows/range_middleware.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Test range middleware

on:
pull_request:
branches:
- main
paths:
- 'smart-contracts/contracts/range-middleware/**'
push:
branches:
- main
workflow_dispatch:

jobs:
unit-test:
uses: ./.github/workflows/rust_basic.yml
with:
contract: 'range-middleware'
10 changes: 1 addition & 9 deletions .github/workflows/rust_basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defaults:
working-directory: smart-contracts/contracts

jobs:
test:
checks:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
Expand All @@ -26,14 +26,6 @@ jobs:
- 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: |
**/target
key: ${{ runner.os }}-${{ inputs.contract }}-$${{ hashFiles('Cargo.toml') }}
restore-keys: ${{ runner.os }}-${{ inputs.contract }}
- name: Rust lint
if: env.GIT_DIFF
run: cd ${{ inputs.contract }} && RUSTFLAGS="-Dwarnings" cargo clippy --workspace -- -D warnings --A deprecated
Expand Down
File renamed without changes.
18 changes: 18 additions & 0 deletions .github/workflows/token_burner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Test token burner

on:
pull_request:
branches:
- main
paths:
- 'smart-contracts/contracts/token-burner/**'
push:
branches:
- main
workflow_dispatch:

jobs:
unit-test:
uses: ./.github/workflows/rust_basic.yml
with:
contract: 'token-burner'
1 change: 0 additions & 1 deletion smart-contracts/contracts/dex-router-osmosis/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ exclude = [
"dex_router_osmosis.wasm",
"hash.txt",
]
##

[lib]
crate-type = ["cdylib", "rlib"]
Expand Down

0 comments on commit b208d99

Please sign in to comment.