Skip to content

Commit

Permalink
test tube and ci (#13)
Browse files Browse the repository at this point in the history
# Description
Added CI for testing the contract using the test-tube.
Added tests to initial version of contract.

# Reviewers checklist:
- [ ] Try to write more meaningful comments with clear actions to be
taken.
- [ ] Nit-picking should be unblocking. Focus on core issues.

# Authors checklist
- [x] Provide a concise and meaningful description
- [x] Review the code yourself first, before making the PR.
- [x] Annotate your PR in places that require explanation.
- [x] Think and try to split the PR to smaller PR if it is big.

<!-- Reviewable:start -->
- - -
This change is [<img src="https://reviewable.io/review_button.svg"
height="34" align="absmiddle"
alt="Reviewable"/>](https://reviewable.io/reviews/CoreumFoundation/coreumbridge-xrpl/13)
<!-- Reviewable:end -->
  • Loading branch information
keyleu authored Sep 25, 2023
1 parent 40e11a9 commit 41f6359
Show file tree
Hide file tree
Showing 10 changed files with 2,293 additions and 215 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/contract-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: contract-ci
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Optimize contract
# TODO: Update it to Make file command
run: |
cd contract
docker run --rm -v "$(pwd)":/code \
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
cosmwasm/rust-optimizer:0.14.0
- name: Run clippy
run: cargo clippy --verbose
working-directory: contract
- name: Build
run: cargo build --verbose
working-directory: contract
- name: Run tests
run: cargo test --verbose
working-directory: contract
1 change: 1 addition & 0 deletions contract/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Build results
/target
/artifacts

# IDEs
.vscode/
Expand Down
Loading

0 comments on commit 41f6359

Please sign in to comment.