Sync from snapshot test, Mainnet, RocksDB pruned #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# This workflow performs sync to Mainnet from a RocksDB pruned snapshot using the latest | |
# main version. | |
# | |
# For now, this test not quite correctly tests sync Mainnet from latest aleph-node binary, | |
# for which we don't guarantee it will always happen to work. | |
name: Sync from snapshot test, Mainnet, RocksDB pruned | |
on: | |
# At 15:00 on Sunday | |
# Time corresponds with a snapshot creation time | |
schedule: | |
- cron: '0 15 * * 0' | |
workflow_dispatch: | |
inputs: | |
snapshot-day: | |
description: "Day in date format %Y-%m-%d. If not given, current date - 1 day is assumed." | |
type: string | |
required: false | |
default: '' | |
concurrency: | |
group: ${{ github.ref }}-${{ github.workflow }} | |
cancel-in-progress: false | |
jobs: | |
check-vars-and-secrets: | |
name: Check vars and secrets | |
uses: ./.github/workflows/_check-vars-and-secrets.yml | |
secrets: inherit | |
build-production-aleph-node: | |
needs: [check-vars-and-secrets] | |
name: Build production aleph-node | |
uses: ./.github/workflows/_build-aleph-node.yml | |
with: | |
ref: ${{ github.ref }} | |
production: true | |
test-sync: | |
needs: [build-production-aleph-node] | |
name: Download snapshot and run | |
runs-on: [self-hosted, Linux, X64, euc1-med-xldisk] | |
timeout-minutes: 120 | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Test sync | |
uses: ./.github/actions/sync-from-snapshot | |
with: | |
# yamllint disable-line rule:line-length | |
aleph-node-artifact-name: ${{ needs.build-production-aleph-node.outputs.artifact-name-binary }} | |
args: --mainnet --pruned | |
aws-access-key-id: ${{ secrets.AWS_MAINNET_S3_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_MAINNET_S3_SECRET_ACCESS_KEY }} | |
snapshot-day: ${{ inputs.snapshot-day }} | |
slack-notification: | |
name: Slack notification | |
runs-on: ubuntu-20.04 | |
needs: [test-sync] | |
if: > | |
!cancelled() && | |
github.event_name != 'workflow_dispatch' | |
steps: | |
- name: Send Slack message | |
uses: Cardinal-Cryptography/github-actions/slack-notification@v7 | |
with: | |
notify-on: "failure" | |
env: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_DEV_ONDUTY }} |