Skip to content

Update for new Perun-Polkadot-Node (Polkadot v1.9) #76

Update for new Perun-Polkadot-Node (Polkadot v1.9)

Update for new Perun-Polkadot-Node (Polkadot v1.9) #76

Workflow file for this run

name: Go
on:
pull_request
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.17
- name: Checkout
uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.45
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Checkout
uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Start Substrate node
run: docker run --rm -d --name substrate -p 9944:9944 ghcr.io/perun-network/polkadot-test-node:0.2.0
- name: Wait for Substrate node
# Wait for port 9944 to listen.
# https://github.com/marketplace/actions/wait-on did not work…
run: timeout 25 bash -c "until nc -z 127.0.0.1 9944; do sleep 1; done"
- name: Unit tests
# Running the go tests with the `-p 1` flag is important, since the
# tests otherwise are started in parallel and mess up the account nonce.
run: go test -timeout 360s -p 1 ./...
- name: Stop Substrate node
run: docker stop substrate