Skip to content

Nightly Build

Nightly Build #107

Workflow file for this run

---
name: Nightly Build
on: # yamllint disable-line rule:truthy
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 0 * * *'
jobs:
check:
name: Check new commits
runs-on: ubuntu-latest
outputs:
new_commit_count: ${{ steps.get_new_commits.outputs.commit_count }}
steps:
- name: Checkout Code
uses: actions/[email protected]
- name: Get new commits
id: get_new_commits
run: echo "commit_count=$(git log --oneline --since '24 hours ago' | wc -l | tr -d ' ')" >> $GITHUB_OUTPUT
ci:
name: CI
uses: ./.github/workflows/ci.yml
needs: check
if: needs.check.outputs.new_commit_count > 0
with:
build-blade: true
lint: true
unit-test: true
e2e-polybft-test: true
e2e-legacy-test: true
property-polybft-test: true
fuzz-test: true
deploy_network:
name: Deploy Network
uses: ./.github/workflows/deploy-network.yml
needs: check
if: needs.check.outputs.new_commit_count > 0
with:
environment: nightly
block_gas_limit: "200000000"
block_time: "2"
is_london_fork_active: true
is_bridge_active: true
notification: false
secrets:
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }}
AWS_S3_BLADE_BUCKET: ${{ secrets.AWS_S3_BLADE_BUCKET }}
VAULT_PASSWORD: ${{ secrets.VAULT_PASSWORD }}
load_test_multiple_eoa:
name: Load Test EOA
uses: ./.github/workflows/load-test.yml
needs: deploy_network
with:
environment: nightly
scenario: EOA
timeout: "220s"
rate: "3000"
timeUnit: "1s"
duration: "10m"
preAllocatedVUs: "60"
maxVUs: "60"
notification: false
secrets:
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }}
AWS_S3_BLADE_BUCKET: ${{ secrets.AWS_S3_BLADE_BUCKET }}
AWS_LOADTESTRUNNER_AMI_ID: ${{ secrets.AWS_LOADTESTRUNNER_AMI_ID }}
AWS_LOADTESTRUNNER_SUBNET_ID: ${{ secrets.AWS_LOADTESTRUNNER_SUBNET_ID }}
AWS_LOADTESTRUNNER_SG_ID: ${{ secrets.AWS_LOADTESTRUNNER_SG_ID }}
AWS_LOADTESTRUNNER_MNEMONIC: ${{ secrets.AWS_LOADTESTRUNNER_MNEMONIC }}
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
load_test_multiple_erc20:
name: Load Test ERC20
uses: ./.github/workflows/load-test.yml
needs: [deploy_network, load_test_multiple_eoa]
with:
environment: nightly
scenario: ERC20
timeout: "220s"
rate: "1500"
timeUnit: "1s"
duration: "10m"
preAllocatedVUs: "60"
maxVUs: "60"
notification: false
secrets:
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }}
AWS_S3_BLADE_BUCKET: ${{ secrets.AWS_S3_BLADE_BUCKET }}
AWS_LOADTESTRUNNER_AMI_ID: ${{ secrets.AWS_LOADTESTRUNNER_AMI_ID }}
AWS_LOADTESTRUNNER_SUBNET_ID: ${{ secrets.AWS_LOADTESTRUNNER_SUBNET_ID }}
AWS_LOADTESTRUNNER_SG_ID: ${{ secrets.AWS_LOADTESTRUNNER_SG_ID }}
AWS_LOADTESTRUNNER_MNEMONIC: ${{ secrets.AWS_LOADTESTRUNNER_MNEMONIC }}
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
destroy_network:
name: Destroy Network
uses: ./.github/workflows/destroy-network.yml
needs: [deploy_network, load_test_multiple_eoa, load_test_multiple_erc20]
if: always()
with:
environment: nightly
logs: true
notification: false
secrets:
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }}
AWS_S3_BLADE_BUCKET: ${{ secrets.AWS_S3_BLADE_BUCKET }}
VAULT_PASSWORD: ${{ secrets.VAULT_PASSWORD }}
notification_nightly:
name: Nightly Notification
uses: ./.github/workflows/notification-nightly.yml
needs: [ci, deploy_network, load_test_multiple_eoa, load_test_multiple_erc20, destroy_network]
if: success() || failure()
with:
environment: nightly
logs: true
build_blade_output: ${{ needs.ci.outputs.build-blade }}
lint_output: ${{ needs.ci.outputs.lint }}
unit_test_output: ${{ needs.ci.outputs.unit-test }}
e2e_polybft_test_output: ${{ needs.ci.outputs.e2e-polybft-test }}
e2e_legacy_test_output: ${{ needs.ci.outputs.e2e-legacy-test }}
property_polybft_test_output: ${{ needs.ci.outputs.property-polybft-test }}
fuzz_test_output: ${{ needs.ci.outputs.fuzz-test }}
deploy_network_terraform_output: ${{ needs.deploy_network.outputs.terraform_output }}
deploy_network_ansible_output: ${{ needs.deploy_network.outputs.ansible_output }}
load_test_multiple_eoa_output: ${{ needs.load_test_multiple_eoa.outputs.load_test_output }}
load_test_multiple_erc20_output: ${{ needs.load_test_multiple_erc20.outputs.load_test_output }}
destroy_network_logs_output: ${{ needs.destroy_network.outputs.logs_output }}
destroy_network_terraform_output: ${{ needs.destroy_network.outputs.terraform_output }}
secrets:
AWS_S3_BLADE_BUCKET: ${{ secrets.AWS_S3_BLADE_BUCKET }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
notification_load_test_multiple_eoa:
name: Load Test EOA Notification
uses: ./.github/workflows/notification-load-test.yml
needs: [load_test_multiple_eoa, notification_nightly]
if: (always() && needs.load_test_multiple_eoa.outputs.load_test_output == 'true')
with:
environment: nightly
scenario: EOA
tps_avg: ${{ needs.load_test_multiple_eoa.outputs.tps_avg }}
tps_max: ${{ needs.load_test_multiple_eoa.outputs.tps_max }}
iterations: ${{ needs.load_test_multiple_eoa.outputs.iterations }}
block: ${{ needs.load_test_multiple_eoa.outputs.block }}
ttm: ${{ needs.load_test_multiple_eoa.outputs.ttm }}
gas_avg: ${{ needs.load_test_multiple_eoa.outputs.gas_avg }}
gas_max: ${{ needs.load_test_multiple_eoa.outputs.gas_max }}
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
notification_load_test_multiple_erc20:
name: Load Test ERC20 Notification
uses: ./.github/workflows/notification-load-test.yml
needs: [load_test_multiple_erc20, notification_nightly]
if: (always() && needs.load_test_multiple_erc20.outputs.load_test_output == 'true')
with:
environment: nightly
scenario: ERC20
tps_avg: ${{ needs.load_test_multiple_erc20.outputs.tps_avg }}
tps_max: ${{ needs.load_test_multiple_erc20.outputs.tps_max }}
iterations: ${{ needs.load_test_multiple_erc20.outputs.iterations }}
block: ${{ needs.load_test_multiple_erc20.outputs.block }}
ttm: ${{ needs.load_test_multiple_erc20.outputs.ttm }}
gas_avg: ${{ needs.load_test_multiple_erc20.outputs.gas_avg }}
gas_max: ${{ needs.load_test_multiple_erc20.outputs.gas_max }}
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}