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
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- run: 'echo "No build required"'
|
- 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
|
default: false
|
||||||
description: 'Just run a lightwalletd full sync and update tip disks'
|
description: 'Just run a lightwalletd full sync and update tip disks'
|
||||||
required: true
|
required: true
|
||||||
|
run-lwd-send-tx:
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
description: 'Just run a lightwalletd send transactions test'
|
||||||
|
required: true
|
||||||
|
|
||||||
|
|
||||||
pull_request:
|
pull_request:
|
||||||
|
@ -186,7 +191,7 @@ jobs:
|
||||||
name: Test all
|
name: Test all
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build
|
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:
|
steps:
|
||||||
- name: Inject slug/short variables
|
- name: Inject slug/short variables
|
||||||
uses: rlespinasse/github-slug-action@v4
|
uses: rlespinasse/github-slug-action@v4
|
||||||
|
@ -205,7 +210,7 @@ jobs:
|
||||||
name: Test all with getblocktemplate-rpcs feature
|
name: Test all with getblocktemplate-rpcs feature
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build
|
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:
|
steps:
|
||||||
- name: Inject slug/short variables
|
- name: Inject slug/short variables
|
||||||
uses: rlespinasse/github-slug-action@v4
|
uses: rlespinasse/github-slug-action@v4
|
||||||
|
@ -230,7 +235,7 @@ jobs:
|
||||||
name: Test with fake activation heights
|
name: Test with fake activation heights
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build
|
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:
|
steps:
|
||||||
- name: Inject slug/short variables
|
- name: Inject slug/short variables
|
||||||
uses: rlespinasse/github-slug-action@v4
|
uses: rlespinasse/github-slug-action@v4
|
||||||
|
@ -251,7 +256,7 @@ jobs:
|
||||||
name: Test checkpoint sync from empty state
|
name: Test checkpoint sync from empty state
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build
|
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:
|
steps:
|
||||||
- name: Inject slug/short variables
|
- name: Inject slug/short variables
|
||||||
uses: rlespinasse/github-slug-action@v4
|
uses: rlespinasse/github-slug-action@v4
|
||||||
|
@ -270,7 +275,7 @@ jobs:
|
||||||
name: Test integration with lightwalletd
|
name: Test integration with lightwalletd
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build
|
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:
|
steps:
|
||||||
- name: Inject slug/short variables
|
- name: Inject slug/short variables
|
||||||
uses: rlespinasse/github-slug-action@v4
|
uses: rlespinasse/github-slug-action@v4
|
||||||
|
@ -324,7 +329,7 @@ jobs:
|
||||||
name: Zebra checkpoint update
|
name: Zebra checkpoint update
|
||||||
needs: regenerate-stateful-disks
|
needs: regenerate-stateful-disks
|
||||||
uses: ./.github/workflows/deploy-gcp-tests.yml
|
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:
|
with:
|
||||||
app_name: zebrad
|
app_name: zebrad
|
||||||
test_id: sync-past-checkpoint
|
test_id: sync-past-checkpoint
|
||||||
|
@ -390,7 +395,7 @@ jobs:
|
||||||
name: Zebra tip update
|
name: Zebra tip update
|
||||||
needs: test-full-sync
|
needs: test-full-sync
|
||||||
uses: ./.github/workflows/deploy-gcp-tests.yml
|
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:
|
with:
|
||||||
app_name: zebrad
|
app_name: zebrad
|
||||||
test_id: update-to-tip
|
test_id: update-to-tip
|
||||||
|
@ -455,7 +460,7 @@ jobs:
|
||||||
name: lightwalletd tip update
|
name: lightwalletd tip update
|
||||||
needs: lightwalletd-full-sync
|
needs: lightwalletd-full-sync
|
||||||
uses: ./.github/workflows/deploy-gcp-tests.yml
|
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:
|
with:
|
||||||
app_name: lightwalletd
|
app_name: lightwalletd
|
||||||
test_id: lwd-update-sync
|
test_id: lwd-update-sync
|
||||||
|
@ -484,7 +489,7 @@ jobs:
|
||||||
name: Zebra tip JSON-RPC
|
name: Zebra tip JSON-RPC
|
||||||
needs: test-full-sync
|
needs: test-full-sync
|
||||||
uses: ./.github/workflows/deploy-gcp-tests.yml
|
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:
|
with:
|
||||||
app_name: lightwalletd
|
app_name: lightwalletd
|
||||||
test_id: fully-synced-rpc
|
test_id: fully-synced-rpc
|
||||||
|
@ -500,7 +505,6 @@ jobs:
|
||||||
#
|
#
|
||||||
# Runs:
|
# Runs:
|
||||||
# - after every PR is merged to `main`
|
# - 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.
|
# 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.
|
# Otherwise, if the state rebuild was skipped, runs immediately after the build job.
|
||||||
|
@ -509,7 +513,7 @@ jobs:
|
||||||
name: lightwalletd tip send
|
name: lightwalletd tip send
|
||||||
needs: lightwalletd-full-sync
|
needs: lightwalletd-full-sync
|
||||||
uses: ./.github/workflows/deploy-gcp-tests.yml
|
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:
|
with:
|
||||||
app_name: lightwalletd
|
app_name: lightwalletd
|
||||||
test_id: lwd-send-transactions
|
test_id: lwd-send-transactions
|
||||||
|
@ -522,6 +526,14 @@ jobs:
|
||||||
root_state_path: '/var/cache'
|
root_state_path: '/var/cache'
|
||||||
zebra_state_dir: 'zebrad-cache'
|
zebra_state_dir: 'zebrad-cache'
|
||||||
lwd_state_dir: 'lwd-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
|
# Test that Zebra can handle gRPC wallet calls, using a cached Zebra tip state
|
||||||
#
|
#
|
||||||
|
@ -535,7 +547,7 @@ jobs:
|
||||||
name: lightwalletd GRPC tests
|
name: lightwalletd GRPC tests
|
||||||
needs: lightwalletd-full-sync
|
needs: lightwalletd-full-sync
|
||||||
uses: ./.github/workflows/deploy-gcp-tests.yml
|
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:
|
with:
|
||||||
app_name: lightwalletd
|
app_name: lightwalletd
|
||||||
test_id: lwd-grpc-wallet
|
test_id: lwd-grpc-wallet
|
||||||
|
|
Loading…
Reference in New Issue