Skip to content

nigiri start launches on mainnet when running with act #211

Description

@luisschwab

I am trying to use Nigiri to run some CLI wallet tests for BDK on CI. When running the script below directly on my system, it works and launches bitcoind on regtest as expected, but when running it as a GitHub action via act, it launches bitcoind on mainnet instead, even though ~/.nigiri/nigiri.config.json says "network":"regtest". Am I missing something here?

  test-wallet-rpc:
    needs: prepare
    name: Test example_wallet_cli
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          persist-credentials: false
      - name: Install Rust toolchain
        uses: actions-rs/toolchain@v1
        with:
          toolchain: ${{ needs.prepare.outputs.rust_version }}
          override: true
          profile: minimal
      - name: Rust Cache
        uses: Swatinem/rust-cache@v2.7.7
      - name: Setup Docker
        uses: docker/setup-buildx-action@v2
      - name: Setup Nigiri
        run: |
          # Install dependencies
          #sudo apt update
          #sudo apt install -y jq
          
          # Install Nigiri and verify
          curl -sL https://getnigiri.vulpem.com | bash
          nigiri version
          
      - name: Run CLI test
        working-directory: example-crates/example_wallet_rpc
        run: |
          # Define environment variables
          export RPC_USER=admin1
          export RPC_PASS=123
          export RPC_URL=127.0.0.1:18443
          export WALLET_NAME="example_wallet_rpc"       

          # Start Nigiri and wait
          nigiri start
          sleep 5

          cat /root/.nigiri/nigiri.config.json

          nigiri rpc getblockchaininfo
[CI/Test example_wallet_cli]   🐳  docker exec cmd=[bash -e /var/run/act/workflow/5] user= workdir=example-crates/example_wallet_rpc
[+] Running 4/4
|  ✔ Container bitcoin     Running0.0s 
|  ✔ Container electrs     Running0.0s 
|  ✔ Container esplora     Running0.0s 
|  ✔ Container chopsticks  Started0.0s 
| 🍣 nigiri configuration located at /root/.nigiri/nigiri.config.json
| 
| 🍜 ENDPOINTS
| ✓ bitcoin: localhost:18443
| ✓ esplora: localhost:5000
| ✓ chopsticks: localhost:3000
| ✓ electrs: localhost:50000
|
| {"ark":"false","ci":"false","liquid":"false","ln":"false","network":"regtest","ready":"true","running":"true"}
|
| {
|     "bestblockhash":  "00000000000000008d98c81d713149965414cae31d3dd531878629b783731bbf",
|     "blocks":  288941,
|     "chain":  "main",
|     "chainwork":  "0000000000000000000000000000000000000000000020e183942c83938869bc",
|     "difficulty":  3815723798.81463,
|     "headers":  886756,
|     "initialblockdownload":  true,
|     "mediantime":  1393969708,
|     "pruned":  false,
|     "size_on_disk":  18599616661,
|     "time":  1393972216,
|     "verificationprogress":  0.02898808519958874,
|     "warnings":  []
| }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions