Skip to content

bloxbean/devkit-npm-ci-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tests with Yaci DevKit

Yaci DevKit GitHub Actions CI Test using NPM distribution

A sample project that demonstrates how to use Yaci DevKit in a GitHub Actions CI test.
It uses Yaci DevKit's npm installation.

GitHub Action Yaml file configuration

The following configuration starts Yaci DevKit in Yaci Store mode, providing a Blockfrost-compatible API.

Note: If you want to start Ogmios and Kupo, use the --enable-kupomios option instead of --enable-yaci-store.

      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '20.8.0'

      - name: Install Yaci DevKit
        run: npm install -g @bloxbean/yaci-devkit

      - name: Start Yaci DevKit in background
        run: nohup  yaci-devkit up --enable-yaci-store &

      - name: Wait for Yaci DevKit to start
        run: |
          for i in {1..30}; do
            if nc -z localhost 8080; then
              echo "Yaci DevKit is up!"
              exit 0
            fi
            echo "Waiting for Yaci DevKit to start..."
            sleep 5
          done
          echo "Yaci DevKit failed to start" >&2
          exit 1

Test Code

In the test package, you can find the TestHelper class, which provides various utility methods such as resetDevNet and topUpFund.
These methods can be used to reset the network between tests or top up funds to any address.

For non-Java projects, you can implement similar methods to invoke Yaci DevKit's admin endpoints for various operations.

The default URL for Yaci DevKit's admin endpoint is http://localhost:10000/

A full list of supported admin APIs can be found at: http://localhost:10000/swagger-ui/index.html

Default Blockfrost-compatible indexer URL: http://localhost:8080/api/v1/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages