Skip to content

Remove nil gas price check from EstimateFee (#915) #154

Remove nil gas price check from EstimateFee (#915)

Remove nil gas price check from EstimateFee (#915) #154

name: upgrade nodes on test env
on:
push:
branches:
- main
release:
types: [created]
jobs:
upgrade_nodes_on_test_env:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Define docker image tag
run: echo "DOCKER_IMAGE_TAG=${{ github.actor }}-${{ github.sha }}" >> $GITHUB_ENV
- name: Set node host
id: set-host
run: |
if [[ "${{ github.event_name }}" == "push" ]]; then
echo "HOST=${{ secrets.STAGING_IP }}" >> $GITHUB_ENV
elif [[ "${{ github.event_name }}" == "release" ]]; then
echo "HOST=${{ secrets.RELEASE_IP }}" >> $GITHUB_ENV
fi
- name: Trigger build_and_push_docker_image
id: trigger-build
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Build and publish Docker image
token: ${{ secrets.REPOSITORY_DISPATCH_TOKEN }}
ref: ${{ github.ref }}
inputs: '{"tag": "${{ env.DOCKER_IMAGE_TAG }}"}'
- name: Wait for build_and_push_docker_image workflow to complete
uses: fountainhead/action-wait-for-check@v1.1.0
id: wait-for-build
with:
token: ${{ secrets.GITHUB_TOKEN }}
checkName: build_and_push_docker_image
intervalSeconds: 60
timeoutSeconds: 1800
- name: Remove old Juno containers and start new ones
if: steps.wait-for-build.outputs.conclusion == 'success'
uses: appleboy/ssh-action@v0.1.10
with:
host: ${{ env.HOST }}
username: ${{ secrets.VM_USERNAME }}
password: ${{ secrets.VM_PASSWORD }}
envs: DOCKER_IMAGE_TAG
script: |
port=6060
for network in mainnet goerli goerli2 integration; do
docker stop juno_$network
docker rm juno_$network
if [ "$network" == "mainnet" ]; then
ETH_NODE_PARAM="--eth-node ${{ secrets.ETH_NODE_MAINNET }}"
PPROF_PARAM="--pprof"
elif [ "$network" == "goerli" ] || [ "$network" == "goerli2" ]; then
ETH_NODE_PARAM="--eth-node ${{ secrets.ETH_NODE_GOERLI }}"
PPROF_PARAM=""
elif [ "$network" == "integration" ]; then
ETH_NODE_PARAM=""
PPROF_PARAM=""
fi
docker run -d \
--name juno_$network \
-p $port:$port \
-v /root/juno_$network:/var/lib/juno \
nethermindeth/juno:${{ env.DOCKER_IMAGE_TAG }} \
--db-path /var/lib/juno \
--http-port $port \
--network $network \
--colour=false \
$ETH_NODE_PARAM \
$PPROF_PARAM
port=$((port+5))
nohup sh -c "docker logs -f juno_$network > /var/log/juno_logs_$network.log 2>&1" &>/dev/null &
done
- name: Trigger RPC Tests on deployed mainnet
uses: benc-uk/workflow-dispatch@v1
with:
workflow: RPC Tests
token: ${{ secrets.REPOSITORY_DISPATCH_TOKEN }}
ref: ${{ github.ref }}
inputs: '{"NODE_ADDRESS": "http://${{ env.HOST }}:6060", "NETWORK": "mainnet"}'
- name: Trigger Load tests on deployed mainnet
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Load tests
token: ${{ secrets.REPOSITORY_DISPATCH_TOKEN }}
ref: ${{ github.ref }}
inputs: '{"NODE_URL": "http://${{ env.HOST }}:6060", "VUS": "2", "DURATION": "300s"}'