-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from IntersectMBO/add_dbsync_workflow
Add workflow for db-sync sync tests
- Loading branch information
Showing
2 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
steps: | ||
- label: ':drum_with_drumsticks: Full sync test :drum_with_drumsticks:' | ||
commands: | ||
- nix develop --accept-flake-config ..#python --command python ./db_sync_tests/tests/full_sync_from_clean_state.py -npr "${node_pr}" -nbr "${node_branch}" -nv "${node_version}" -dbr "${db_sync_branch}" -dv "${db_sync_version}" -dsa "${db_sync_start_arguments}" -e "${environment}" | ||
- nix develop --accept-flake-config ..#python --command python ./db_sync_tests/tests/snapshot_creation.py -dpr "${db_sync_pr}" -dbr "${db_sync_branch}" -dv "${db_sync_version}" -e "${environment}" -rosc "${run_only_sync_test}" | ||
- nix develop --accept-flake-config ..#python --command python ./db_sync_tests/tests/local_snapshot_restoration.py -npr "${node_pr}" -nbr "${node_branch}" -nv "${node_version}" -dbr "${db_sync_branch}" -dv "${db_sync_version}" -dsa "${db_sync_start_arguments}" -e "${environment}" -rosc "${run_only_sync_test}" | ||
timeout_in_minutes: 43200 | ||
agents: | ||
system: x86_64-linux | ||
queue: core-tech-bench |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: db-sync - full cycle tests | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
node_pr: | ||
description: node pull request number | ||
required: true | ||
default: "4269" | ||
node_branch: | ||
description: node branch or tag | ||
required: true | ||
default: "1.35.3" | ||
node_version: | ||
description: node version - 1.33.0-rc2 (tag number) or 1.33.0 (release number - for released versions) or 1.33.0_PR2124 (for not released and not tagged runs with a specific node PR/version) | ||
required: true | ||
default: "1.35.3" | ||
db_sync_branch: | ||
description: db-sync branch or tag | ||
required: true | ||
default: "tags/13.0.5" | ||
db_sync_pr: | ||
description: db-sync pr | ||
required: true | ||
default: "1208" | ||
db_sync_version: | ||
description: db-sync version - 12.0.0-rc2 (tag number) or 12.0.2 (release number - for released versions) or 12.0.2_PR2124 (for not released and not tagged runs with a specific db_sync PR/version) | ||
required: true | ||
default: "13.0.5" | ||
db_sync_start_arguments: | ||
description: argument to be passed when starting the db-sync - none, disable-ledger, disable-epoch, disable-cache | ||
required: false | ||
default: "none" | ||
environment: | ||
description: environment on which to run the tests - shelley-qa, preview, preprod or mainnet | ||
required: true | ||
default: "preprod" | ||
run_only_sync_test: | ||
type: boolean | ||
default: true | ||
description: "If checked only full sync test will be run otherwise local snapshot creation and restoration tests will be started after sync test is completed" | ||
|
||
jobs: | ||
db_sync_test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: trigger the Buildkite pipeline - run db-sync full sync test | ||
uses: 'buildkite/trigger-pipeline-action@v1.5.0' | ||
env: | ||
BUILDKITE_API_ACCESS_TOKEN: ${{ secrets.BUILDKITE_API_ACCESS_TOKEN }} | ||
PIPELINE: 'input-output-hk/db-sync_sync_tests' | ||
BRANCH: ${{ github.ref_name || 'main' }} | ||
MESSAGE: ':github: Triggered by GitHub Action' | ||
AWS_DB_USERNAME: ${{ secrets.AWS_DB_USERNAME }} | ||
AWS_DB_PASS: ${{ secrets.AWS_DB_PASS }} | ||
AWS_DB_NAME: ${{ secrets.AWS_DB_NAME }} | ||
AWS_DB_HOSTNAME: ${{ secrets.AWS_DB_HOSTNAME }} | ||
BUILD_ENV_VARS: '{ | ||
"node_pr":"${{ github.event.inputs.node_pr }}", | ||
"node_branch":"${{ github.event.inputs.node_branch }}", | ||
"node_version":"${{ github.event.inputs.node_version }}", | ||
"db_sync_pr":"${{ github.event.inputs.db_sync_pr }}", | ||
"db_sync_branch":"${{ github.event.inputs.db_sync_branch }}", | ||
"db_sync_version":"${{ github.event.inputs.db_sync_version }}", | ||
"db_sync_start_arguments":"${{ github.event.inputs.db_sync_start_arguments }}", | ||
"environment":"${{ github.event.inputs.environment }}", | ||
"run_only_sync_test":"${{ github.event.inputs.run_only_sync_test }}", | ||
"AWS_DB_USERNAME":"${{ secrets.AWS_DB_USERNAME }}", | ||
"AWS_DB_PASS":"${{ secrets.AWS_DB_PASS }}", | ||
"AWS_DB_NAME":"${{ secrets.AWS_DB_NAME }}", | ||
"AWS_DB_HOSTNAME":"${{ secrets.AWS_DB_HOSTNAME }}" | ||
}' |