Coder Social home page Coder Social logo

algorand / graviton Goto Github PK

View Code? Open in Web Editor NEW
17.0 6.0 8.0 207 KB

๐Ÿง‘โ€๐Ÿ”ฌ verify your TEAL program by experiment and observation

License: MIT License

Makefile 0.30% Python 27.82% Jupyter Notebook 71.88%
algorand avm blockchain pyteal pytest python smart-contracts tdd teal test-driven-development

graviton's Introduction

Algorand

About

Graviton is a software toolkit for blackbox testing of smart contracts written in TEAL.

Local Installation

The following instructions assume that you have make available in your local environment. In Mac OS and Linux this is most likely already available and in Windows one way to install is with chocolatey and the command choco install make.

To install all dependencies:

make pip-notebooks

Running Blackbox Integration Tests against a Sandbox

Prereq - Install and Symbolically Link to the Sandbox

If you would like to use the Makefile without modification and with full functionality, you should create a symbolic link to the algorand sandbox repo as described here. There are many ways to accomplish this. Assuming you have cloned the sandbox into the path /path/to/algorand/sandbox/ and that you've cd'ed into the cloned graviton directory you should create a symbolic link as follows:

Linux / Mac OS

ln -s /path/to/algorand/sandbox/ sandbox

Windows 10+

mklink sandbox \path\to\algorand\sandbox

Test the Sandbox

With your sandbox running to test that the sandbox is running properly, use the following:

make local-sandbox-test

Run the Integration Tests

make integration-test

Running and Testing Jupyter Notebooks

To run the notebook notebooks/quadratic_factoring_game.ipynb for example:

make local-notebook NOTEBOOK=notebooks/quadratic_factoring_game.ipynb

To non-interactively run all the jupyter notebook tests:

make notebooks-test

Ensuring that all is Copacetic Before Pushing to Github

To test in your local environment that everything is looking good before pushing to Github, it is recommended that you run make all-tests

If you would like to simulate the github actions locally, you'll need to install nektos act. On Mac OS with Docker previously installed you can use brew install act; on the other hand, on Linux and Windows follow the installation instructions in the nextos repo link above.

Once act is available you can simulate all the github actions integration tests with:

make local-gh-simulate

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.