ci: Fix Travis CI tests (#2)

This commit is contained in:
John Rees 2021-10-09 01:15:38 +01:00 committed by GitHub
parent 7017ecbaee
commit aa68417b1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 10 deletions

View File

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

View File

@ -1,5 +1,7 @@
# Assert Balances # Assert Balances
[![Build Status](https://app.travis-ci.com/project-serum/assert-balances.svg?branch=master)](https://app.travis-ci.com/project-serum/assert-balances)
Assert Balances can be used as an additional safety check by wallets and other apps 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 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, insert into the end of a transaction an instruction that calls this program,