.travis.yml 2.7 KB

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