ci-lazer-sui-contract.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. name: "Lazer Sui contract test"
  2. on:
  3. push:
  4. branches:
  5. - main
  6. pull_request:
  7. paths:
  8. - lazer/contracts/sui/**
  9. - .github/workflows/ci-lazer-sui-contract.yml
  10. jobs:
  11. lazer-sui-contract-test:
  12. name: Lazer Sui contract test
  13. runs-on: ubuntu-latest
  14. defaults:
  15. run:
  16. working-directory: lazer/contracts/sui/
  17. steps:
  18. - uses: actions/checkout@v4
  19. - name: Install Sui CLI (binary)
  20. run: |
  21. set -euo pipefail
  22. # Using the latest stable mainnet Sui CLI binary pinned for reproducibility.
  23. # To bump: update SUI_VERSION to the latest mainnet tag (format: mainnet-vX.Y.Z).
  24. # Asset naming: sui-mainnet-vX.Y.Z-ubuntu-x86_64.tgz under tag mainnet-vX.Y.Z.
  25. CHANNEL="mainnet"
  26. SUI_VERSION="v1.53.2"
  27. ARCHIVE="sui-${CHANNEL}-${SUI_VERSION}-ubuntu-x86_64.tgz"
  28. URL="https://github.com/MystenLabs/sui/releases/download/${CHANNEL}-${SUI_VERSION}/${ARCHIVE}"
  29. echo "Downloading ${URL}"
  30. curl -fsSL -o "${ARCHIVE}" "${URL}"
  31. tar -xzf "${ARCHIVE}"
  32. BIN_PATH="$(find . -maxdepth 2 -type f -name sui | head -n 1)"
  33. chmod +x "${BIN_PATH}"
  34. sudo mv "${BIN_PATH}" /usr/local/bin/sui
  35. sui --version
  36. - name: Run tests
  37. run: sui move test