change(ci): only run the send transaction test on the main branch (#5480)
* only run the send transaction test on the main branch * adds patch job * Add concurrency rule to the send transactions test * Apply suggestions from code review Co-authored-by: teor <teor@riseup.net> * Allow send tx test to be triggered manually Co-authored-by: teor <teor@riseup.net>
This commit is contained in:
parent
733ac09c43
commit
466adc71a6
|
@ -24,3 +24,9 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: 'echo "No build required"'
|
||||
|
||||
lightwalletd-transactions-test:
|
||||
name: lightwalletd tip send / Run lwd-send-transactions test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: 'echo "No build required"'
|
||||
|
|
|
@ -33,6 +33,11 @@ on:
|
|||
default: false
|
||||
description: 'Just run a lightwalletd full sync and update tip disks'
|
||||
required: true
|
||||
run-lwd-send-tx:
|
||||
type: boolean
|
||||
default: false
|
||||
description: 'Just run a lightwalletd send transactions test'
|
||||
required: true
|
||||
|
||||
|
||||
pull_request:
|
||||
|
@ -186,7 +191,7 @@ jobs:
|
|||
name: Test all
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: ${{ github.event.inputs.regenerate-disks != 'true' && github.event.inputs.run-full-sync != 'true' && github.event.inputs.run-lwd-sync != 'true' }}
|
||||
if: ${{ github.event.inputs.regenerate-disks != 'true' && github.event.inputs.run-full-sync != 'true' && github.event.inputs.run-lwd-sync != 'true' && github.event.inputs.run-lwd-send-tx != 'true' }}
|
||||
steps:
|
||||
- name: Inject slug/short variables
|
||||
uses: rlespinasse/github-slug-action@v4
|
||||
|
@ -205,7 +210,7 @@ jobs:
|
|||
name: Test all with getblocktemplate-rpcs feature
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: ${{ github.event.inputs.regenerate-disks != 'true' && github.event.inputs.run-full-sync != 'true' && github.event.inputs.run-lwd-sync != 'true' }}
|
||||
if: ${{ github.event.inputs.regenerate-disks != 'true' && github.event.inputs.run-full-sync != 'true' && github.event.inputs.run-lwd-sync != 'true' && github.event.inputs.run-lwd-send-tx != 'true' }}
|
||||
steps:
|
||||
- name: Inject slug/short variables
|
||||
uses: rlespinasse/github-slug-action@v4
|
||||
|
@ -230,7 +235,7 @@ jobs:
|
|||
name: Test with fake activation heights
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: ${{ github.event.inputs.regenerate-disks != 'true' && github.event.inputs.run-full-sync != 'true' && github.event.inputs.run-lwd-sync != 'true' }}
|
||||
if: ${{ github.event.inputs.regenerate-disks != 'true' && github.event.inputs.run-full-sync != 'true' && github.event.inputs.run-lwd-sync != 'true' && github.event.inputs.run-lwd-send-tx != 'true' }}
|
||||
steps:
|
||||
- name: Inject slug/short variables
|
||||
uses: rlespinasse/github-slug-action@v4
|
||||
|
@ -251,7 +256,7 @@ jobs:
|
|||
name: Test checkpoint sync from empty state
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: ${{ github.event.inputs.regenerate-disks != 'true' && github.event.inputs.run-full-sync != 'true' && github.event.inputs.run-lwd-sync != 'true' }}
|
||||
if: ${{ github.event.inputs.regenerate-disks != 'true' && github.event.inputs.run-full-sync != 'true' && github.event.inputs.run-lwd-sync != 'true' && github.event.inputs.run-lwd-send-tx != 'true' }}
|
||||
steps:
|
||||
- name: Inject slug/short variables
|
||||
uses: rlespinasse/github-slug-action@v4
|
||||
|
@ -270,7 +275,7 @@ jobs:
|
|||
name: Test integration with lightwalletd
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: ${{ github.event.inputs.regenerate-disks != 'true' && github.event.inputs.run-full-sync != 'true' && github.event.inputs.run-lwd-sync != 'true' }}
|
||||
if: ${{ github.event.inputs.regenerate-disks != 'true' && github.event.inputs.run-full-sync != 'true' && github.event.inputs.run-lwd-sync != 'true' && github.event.inputs.run-lwd-send-tx != 'true' }}
|
||||
steps:
|
||||
- name: Inject slug/short variables
|
||||
uses: rlespinasse/github-slug-action@v4
|
||||
|
@ -324,7 +329,7 @@ jobs:
|
|||
name: Zebra checkpoint update
|
||||
needs: regenerate-stateful-disks
|
||||
uses: ./.github/workflows/deploy-gcp-tests.yml
|
||||
if: ${{ !cancelled() && !failure() && github.event.inputs.regenerate-disks != 'true' && github.event.inputs.run-full-sync != 'true' && github.event.inputs.run-lwd-sync != 'true' }}
|
||||
if: ${{ !cancelled() && !failure() && github.event.inputs.regenerate-disks != 'true' && github.event.inputs.run-full-sync != 'true' && github.event.inputs.run-lwd-sync != 'true' && github.event.inputs.run-lwd-send-tx != 'true' }}
|
||||
with:
|
||||
app_name: zebrad
|
||||
test_id: sync-past-checkpoint
|
||||
|
@ -390,7 +395,7 @@ jobs:
|
|||
name: Zebra tip update
|
||||
needs: test-full-sync
|
||||
uses: ./.github/workflows/deploy-gcp-tests.yml
|
||||
if: ${{ !cancelled() && !failure() && github.event.inputs.regenerate-disks != 'true' && github.event.inputs.run-full-sync != 'true' && github.event.inputs.run-lwd-sync != 'true' }}
|
||||
if: ${{ !cancelled() && !failure() && github.event.inputs.regenerate-disks != 'true' && github.event.inputs.run-full-sync != 'true' && github.event.inputs.run-lwd-sync != 'true' && github.event.inputs.run-lwd-send-tx != 'true' }}
|
||||
with:
|
||||
app_name: zebrad
|
||||
test_id: update-to-tip
|
||||
|
@ -455,7 +460,7 @@ jobs:
|
|||
name: lightwalletd tip update
|
||||
needs: lightwalletd-full-sync
|
||||
uses: ./.github/workflows/deploy-gcp-tests.yml
|
||||
if: ${{ !cancelled() && !failure() && github.event.inputs.regenerate-disks != 'true' && github.event.inputs.run-full-sync != 'true' && github.event.inputs.run-lwd-sync != 'true' }}
|
||||
if: ${{ !cancelled() && !failure() && github.event.inputs.regenerate-disks != 'true' && github.event.inputs.run-full-sync != 'true' && github.event.inputs.run-lwd-sync != 'true' && github.event.inputs.run-lwd-send-tx != 'true' }}
|
||||
with:
|
||||
app_name: lightwalletd
|
||||
test_id: lwd-update-sync
|
||||
|
@ -484,7 +489,7 @@ jobs:
|
|||
name: Zebra tip JSON-RPC
|
||||
needs: test-full-sync
|
||||
uses: ./.github/workflows/deploy-gcp-tests.yml
|
||||
if: ${{ !cancelled() && !failure() && github.event.inputs.regenerate-disks != 'true' && github.event.inputs.run-full-sync != 'true' && github.event.inputs.run-lwd-sync != 'true' }}
|
||||
if: ${{ !cancelled() && !failure() && github.event.inputs.regenerate-disks != 'true' && github.event.inputs.run-full-sync != 'true' && github.event.inputs.run-lwd-sync != 'true' && github.event.inputs.run-lwd-send-tx != 'true' }}
|
||||
with:
|
||||
app_name: lightwalletd
|
||||
test_id: fully-synced-rpc
|
||||
|
@ -500,7 +505,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 states to be created.
|
||||
# Otherwise, if the state rebuild was skipped, runs immediately after the build job.
|
||||
|
@ -509,7 +513,7 @@ jobs:
|
|||
name: lightwalletd tip send
|
||||
needs: lightwalletd-full-sync
|
||||
uses: ./.github/workflows/deploy-gcp-tests.yml
|
||||
if: ${{ !cancelled() && !failure() && github.event.inputs.regenerate-disks != 'true' && github.event.inputs.run-full-sync != 'true' && github.event.inputs.run-lwd-sync != 'true' }}
|
||||
if: ${{ !cancelled() && !failure() && ((github.event_name == 'push' && github.ref_name == 'main') || github.event.inputs.run-lwd-send-tx == 'true') }}
|
||||
with:
|
||||
app_name: lightwalletd
|
||||
test_id: lwd-send-transactions
|
||||
|
@ -522,6 +526,14 @@ jobs:
|
|||
root_state_path: '/var/cache'
|
||||
zebra_state_dir: 'zebrad-cache'
|
||||
lwd_state_dir: 'lwd-cache'
|
||||
# We want to prevent multiple lightwalletd send transaction tests running at the same time,
|
||||
# but we don't want to cancel running tests on `main` if a new PR gets merged,
|
||||
# because we might never get a finished test.
|
||||
#
|
||||
# See the concurrency comment on the zebrad test-full-sync job for details.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}−${{ github.ref }}-lightwalletd-transactions-test
|
||||
cancel-in-progress: false
|
||||
|
||||
# Test that Zebra can handle gRPC wallet calls, using a cached Zebra tip state
|
||||
#
|
||||
|
@ -535,7 +547,7 @@ jobs:
|
|||
name: lightwalletd GRPC tests
|
||||
needs: lightwalletd-full-sync
|
||||
uses: ./.github/workflows/deploy-gcp-tests.yml
|
||||
if: ${{ !cancelled() && !failure() && github.event.inputs.regenerate-disks != 'true' && github.event.inputs.run-full-sync != 'true' && github.event.inputs.run-lwd-sync != 'true' }}
|
||||
if: ${{ !cancelled() && !failure() && github.event.inputs.regenerate-disks != 'true' && github.event.inputs.run-full-sync != 'true' && github.event.inputs.run-lwd-sync != 'true' && github.event.inputs.run-lwd-send-tx != 'true' }}
|
||||
with:
|
||||
app_name: lightwalletd
|
||||
test_id: lwd-grpc-wallet
|
||||
|
|
Loading…
Reference in New Issue