Skip to content

Commit

Permalink
ci(sync): only run the lightwalletd full sync on the main branch
Browse files Browse the repository at this point in the history
Previous behavior:
In PR #5164, we made lightwalletd sync all the way to the tip in its full
sync test.

This increases that test's time from 1 hour to 4 hours, which makes the CI
we run on each PR change increase from 3 hours to 6 hours.

Expected behavior:
Run the lightwalletd full sync just on `main` or if a state disk for the
actual version is not found.

Solution:
Add the `github.event_name == 'push' && github.ref_name == 'main'` condition
to the `lightwalletd-full-sync` test.

Fixes #5316
  • Loading branch information
gustavovalverde committed Oct 12, 2022
1 parent a4cb835 commit c6c621c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/continous-integration-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,6 @@ jobs:
#
# Runs:
# - after every PR is merged to `main`
# - on every PR update
#
# If the state version has changed, waits for the new cached state to be created.
# Otherwise, if the state rebuild was skipped, runs immediately after the build job.
Expand All @@ -385,7 +384,7 @@ jobs:
# to also run on Mergify head branches,
# add `|| (github.event_name == 'push' && startsWith(github.head_ref, 'mergify/merge-queue/'))`:
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-your-workflow-based-on-the-head-or-base-branch-of-a-pull-request-1
if: ${{ (!cancelled() && !failure() && github.event.inputs.regenerate-disks != 'true' && github.event.inputs.run-full-sync != 'true') || !fromJSON(needs.get-available-disks.outputs.lwd_tip_disk) }}
if: ${{ (!cancelled() && !failure() && (github.event_name == 'push' && github.ref_name == 'main') && github.event.inputs.regenerate-disks != 'true' && github.event.inputs.run-full-sync != 'true') || !fromJSON(needs.get-available-disks.outputs.lwd_tip_disk) }}
with:
app_name: lightwalletd
test_id: lwd-full-sync
Expand Down

0 comments on commit c6c621c

Please sign in to comment.