Skip to content

[DVT-819][DVT-903] Use p2p.Server and refactor #592

[DVT-819][DVT-903] Use p2p.Server and refactor

[DVT-819][DVT-903] Use p2p.Server and refactor #592

Workflow file for this run

name: CI
on:
push:
branches:
- "main"
pull_request:
branches:
- "**"
types: [opened, synchronize]
concurrency:
group: build-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
GO_VERSION: "1.20"
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
if: (github.event.action != 'closed' || github.event.pull_request.merged == true)
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Install golangci-lint
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin
- name: Install shadow
run: go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow@latest
- name: Run all the linter tools against code
run: make lint
doc:
name: Doc
runs-on: ubuntu-latest
if: (github.event.action != 'closed' || github.event.pull_request.merged == true)
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Try to update polycli documentation
run: make gen-doc
- name: Check if the documentation is up to date
run: |
if [[ -n $(git status --porcelain) ]]; then
echo "❌ Error: Documentation is not up to date. Please run \`make gen-doc\`."
exit 1
else
echo "✅ The documentation is up to date."
fi
test:
name: Test
runs-on: ubuntu-latest
if: (github.event.action != 'closed' || github.event.pull_request.merged == true)
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Run tests
run: make test
loadtest:
name: Loadtest against geth
runs-on: ubuntu-latest
if: (github.event.action != 'closed' || github.event.pull_request.merged == true)
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Install geth 1.12.0
run: |
curl -O https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.12.0-e501b3b0.tar.gz
tar -xvf geth-linux-amd64-1.12.0-e501b3b0.tar.gz
mv geth-linux-amd64-1.12.0-e501b3b0/geth /usr/local/bin/
geth version
- name: Run some loadtest against a geth node in dev mode
run: sh scripts/geth-loadtest.sh