anchor/.travis.yml

74 lines
2.7 KiB
YAML
Raw Normal View History

2021-01-06 12:04:44 -08:00
dist: bionic
2021-01-06 11:52:09 -08:00
language: rust
2021-04-06 20:00:04 -07:00
rust:
- stable
cache: cargo
2021-01-06 11:52:09 -08:00
env:
2021-04-06 20:00:04 -07:00
global:
2021-10-24 17:42:52 -07:00
- NODE_VERSION="17.0.1"
- SOLANA_CLI_VERSION="1.8.0"
git:
submodules: true
2021-01-06 11:52:09 -08:00
_defaults: &defaults
before_install:
2021-06-27 17:09:46 -07:00
- rustup component add rustfmt clippy
2021-01-06 11:52:09 -08:00
- nvm install $NODE_VERSION
2021-01-30 06:45:24 -08:00
- sudo apt-get install -y pkg-config build-essential libudev-dev
2021-01-06 11:52:09 -08:00
2021-09-04 05:33:39 -07:00
_tests: &tests
2021-01-06 12:04:44 -08:00
before_install:
- nvm install $NODE_VERSION
- cd ts && yarn && yarn build && yarn link && cd ../
2021-11-13 18:11:26 -08:00
- cd examples/tutorial && yarn link @project-serum/anchor && yarn && cd ../../
- cd tests && yarn link @project-serum/anchor && yarn && cd ..
2021-01-06 12:04:44 -08:00
- sudo apt-get install -y pkg-config build-essential libudev-dev
- sh -c "$(curl -sSfL https://release.solana.com/v${SOLANA_CLI_VERSION}/install)"
2021-01-06 12:04:44 -08:00
- export PATH="/home/travis/.local/share/solana/install/active_release/bin:$PATH"
- yes | solana-keygen new
2021-04-17 12:07:48 -07:00
- cargo install --path $TRAVIS_BUILD_DIR/cli anchor-cli --locked
2021-01-06 12:04:44 -08:00
2021-01-06 11:52:09 -08:00
jobs:
include:
- <<: *defaults
2021-01-06 12:04:44 -08:00
name: Build and test Rust
2021-01-06 11:52:09 -08:00
script:
- cargo build
- cargo fmt -- --check
2021-06-27 17:09:46 -07:00
- cargo clippy --all-targets -- -D warnings
2021-01-06 11:52:09 -08:00
- cargo test
2021-07-17 17:56:42 -07:00
- pushd ts && yarn && popd
- pushd ts && yarn test && popd
- pushd ts && yarn lint && popd
2021-09-04 05:33:39 -07:00
- <<: *tests
name: Runs the e2e tests 1
2021-01-06 12:04:44 -08:00
script:
- pushd client/example && ./run-test.sh && popd
2021-09-04 05:33:39 -07:00
- pushd tests/sysvars && anchor test && popd
- pushd tests/composite && anchor test && popd
- pushd tests/errors && anchor test && popd
- pushd tests/spl/token-proxy && anchor test && popd
- pushd tests/multisig && anchor test && popd
- pushd tests/interface && anchor test && popd
- pushd tests/lockup && anchor test && popd
- pushd tests/permissioned-markets/deps/serum-dex/dex && cargo build-bpf && cd ../../../ && anchor test && popd
- <<: *tests
name: Runs the e2e tests 2
script:
2021-09-04 05:33:39 -07:00
- pushd tests/misc && anchor test && popd
- pushd tests/events && anchor test && popd
- pushd tests/cashiers-check && anchor test && popd
- pushd tests/typescript && anchor test && popd
- pushd tests/zero-copy && anchor test && popd
- pushd tests/chat && anchor test && popd
- pushd tests/ido-pool && anchor test && popd
2021-09-04 05:33:39 -07:00
- pushd tests/swap/deps/serum-dex/dex && cargo build-bpf && cd ../../../ && anchor test && popd
- pushd tests/cfo && anchor run test-with-build && popd
- <<: *tests
name: Runs the e2e tests 3
script:
- pushd tests/escrow && anchor test && popd
- pushd tests/pyth && anchor test && popd
- pushd tests/system-accounts && anchor test && popd
- pushd examples/tutorial && yarn workspaces run test