Travis and readme

This commit is contained in:
armaniferrante 2021-09-01 12:21:45 -07:00
parent 5ab454649c
commit a07955fb86
No known key found for this signature in database
GPG Key ID: 58BEF301E91F7828
2 changed files with 54 additions and 0 deletions

28
.travis.yml Normal file
View File

@ -0,0 +1,28 @@
dist: bionic
language: rust
rust:
- stable
env:
global:
- NODE_VERSION="v14.7.0"
- SOLANA_VERSION="v1.7.8"
git:
submodules: true
_defaults: &defaults
before_install:
- nvm install $NODE_VERSION
- npm install -g ts-mocha
- sudo apt-get install -y pkg-config build-essential libudev-dev
- sh -c "$(curl -sSfL https://release.solana.com/${SOLANA_VERSION}/install)"
- export PATH="/home/travis/.local/share/solana/install/active_release/bin:$PATH"
- export NODE_PATH="/home/travis/.nvm/versions/node/${NODE_VERSION}/lib/node_modules/:${NODE_PATH}"
- yes | solana-keygen new
- yarn
jobs:
include:
- <<: *defaults
name: Builds and runs the tests
script:
- yarn test

26
README.md Normal file
View File

@ -0,0 +1,26 @@
# Assert Balances
Assert Balances can be used as an additional safety check by wallets and other apps
to ensure the outcome of a given transaction is as expected. One can
insert into the end of a transaction an instruction that calls this program,
asserting that balances are greater than or equal to some expected amount. If a
transaction ends up changing balances more than expected, it will abort.
## Developing
### Build
[Anchor](https://github.com/project-serum/anchor) is used for developoment, and it's
recommended workflow is used here. To get started, see the [guide](https://project-serum.github.io/anchor/getting-started/introduction.html).
```bash
anchor build
```
### Run the Test
Run the tests
```
anchor test
```