Skip to content

Update Perun demos to go-perun 0.10.6 #212

Update Perun demos to go-perun 0.10.6

Update Perun demos to go-perun 0.10.6 #212

Workflow file for this run

name: CI
on: pull_request
jobs:
test-examples:
name: Test Examples
runs-on: ubuntu-latest
env:
ganache-image: trufflesuite/ganache:v7.9.1
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.20'
- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Pull ganache-cli image
run: docker pull ${{ env.ganache-image }}
- name: Simple Client
working-directory: simple-client
env:
MNEMONIC: pistol kiwi shrug future ozone ostrich match remove crucial oblige cream critic
run: |
docker run --rm --name ganache --detach --publish 8545:8545 ${{ env.ganache-image }} -b 5 -a 2 -m "$MNEMONIC"
sleep 5
go run .
docker stop ganache
- name: Payment Channel ETH
working-directory: payment-channel
env:
KEY_DEPLOYER: "0x79ea8f62d97bc0591a4224c1725fca6b00de5b2cea286fe2e0bb35c5e76be46e"
KEY_ALICE: "0x1af2e950272dd403de7a5760d41c6e44d92b6d02797e51810795ff03cc2cda4f"
KEY_BOB: "0xf63d7d8e930bccd74e93cf5662fde2c28fd8be95edb70c73f1bdd863d07f412e"
BALANCE: "10000000000000000000"
run: |
docker run --rm --name ganache --detach --publish 8545:8545 ${{ env.ganache-image }} --wallet.accounts $KEY_DEPLOYER,$BALANCE $KEY_ALICE,$BALANCE $KEY_BOB,$BALANCE --b=5
sleep 5
go run .
docker stop ganache
- name: Payment Channel DOT
working-directory: payment-channel-dot
run: |
docker run --name polkadot --detach --rm -it -p 9944:9944 ghcr.io/perun-network/polkadot-test-node:0.4.0
sleep 5
go run .
docker stop polkadot
- name: App Channel
working-directory: app-channel
env:
KEY_DEPLOYER: "0x79ea8f62d97bc0591a4224c1725fca6b00de5b2cea286fe2e0bb35c5e76be46e"
KEY_ALICE: "0x1af2e950272dd403de7a5760d41c6e44d92b6d02797e51810795ff03cc2cda4f"
KEY_BOB: "0xf63d7d8e930bccd74e93cf5662fde2c28fd8be95edb70c73f1bdd863d07f412e"
BALANCE: "10000000000000000000"
run: |
docker run --rm --name ganache --detach --publish 8545:8545 ${{ env.ganache-image }} --wallet.accounts $KEY_DEPLOYER,$BALANCE $KEY_ALICE,$BALANCE $KEY_BOB,$BALANCE --b=5
sleep 5
go run .
docker stop ganache
# - name: Collateralized Channels
# working-directory: collateralized-channels
# env:
# GANACHE_CMD: "docker run --name ganache --rm --publish 8545:8545 ${{ env.ganache-image }}"
# run: |
# go test -v -timeout 60s .
# docker stop ganache || true # Cleanup