.travis.yml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. dist: bionic
  2. language: rust
  3. rust:
  4. - stable
  5. cache: cargo
  6. env:
  7. global:
  8. - NODE_VERSION="17.0.1"
  9. - SOLANA_CLI_VERSION="1.8.0"
  10. - NODE_VERSION="17.0.1"
  11. - SOLANA_CLI_VERSION="1.7.11"
  12. git:
  13. submodules: true
  14. _defaults: &defaults
  15. before_install:
  16. - rustup component add rustfmt clippy
  17. - nvm install $NODE_VERSION
  18. - sudo apt-get install -y pkg-config build-essential libudev-dev
  19. _tests: &tests
  20. before_install:
  21. - nvm install $NODE_VERSION
  22. - cd ts && yarn && yarn build && yarn link && cd ../
  23. - cd examples/tutorial && yarn link @project-serum/anchor && yarn && cd ../../
  24. - cd tests && yarn link @project-serum/anchor && yarn && cd ..
  25. - sudo apt-get install -y pkg-config build-essential libudev-dev
  26. - sh -c "$(curl -sSfL https://release.solana.com/v${SOLANA_CLI_VERSION}/install)"
  27. - export PATH="/home/travis/.local/share/solana/install/active_release/bin:$PATH"
  28. - yes | solana-keygen new
  29. - cargo install --path $TRAVIS_BUILD_DIR/cli anchor-cli --locked
  30. jobs:
  31. include:
  32. - <<: *defaults
  33. name: Build and test Rust
  34. script:
  35. - cargo build
  36. - cargo fmt -- --check
  37. - cargo clippy --all-targets -- -D warnings
  38. - cargo test
  39. - pushd ts && yarn && popd
  40. - pushd ts && yarn test && popd
  41. - pushd ts && yarn lint && popd
  42. - <<: *tests
  43. name: Runs the e2e tests 1
  44. script:
  45. - pushd client/example && ./run-test.sh && popd
  46. - pushd tests/sysvars && anchor test && popd
  47. - pushd tests/composite && anchor test && popd
  48. - pushd tests/errors && anchor test && popd
  49. - pushd tests/spl/token-proxy && anchor test && popd
  50. - pushd tests/multisig && anchor test && popd
  51. - pushd tests/interface && anchor test && popd
  52. - pushd tests/lockup && anchor test && popd
  53. - pushd tests/permissioned-markets/deps/serum-dex/dex && cargo build-bpf && cd ../../../ && anchor test && popd
  54. - <<: *tests
  55. name: Runs the e2e tests 2
  56. script:
  57. - pushd tests/misc && anchor test && popd
  58. - pushd tests/events && anchor test && popd
  59. - pushd tests/cashiers-check && anchor test && popd
  60. - pushd tests/typescript && anchor test && popd
  61. - pushd tests/zero-copy && anchor test && popd
  62. - pushd tests/chat && anchor test && popd
  63. - pushd tests/ido-pool && anchor test && popd
  64. - pushd tests/swap/deps/serum-dex/dex && cargo build-bpf && cd ../../../ && anchor test && popd
  65. - pushd tests/cfo && anchor run test-with-build && popd
  66. - <<: *tests
  67. name: Runs the e2e tests 3
  68. script:
  69. - pushd tests/escrow && anchor test && popd
  70. - pushd tests/pyth && anchor test && popd
  71. - pushd tests/system-accounts && anchor test && popd
  72. - pushd examples/tutorial && yarn workspaces run test