Skip to content

Commit

Permalink
chore: better workflow reference names
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavovalverde committed Sep 13, 2024
1 parent 617c0e7 commit dea386c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/sub-deploy-integration-tests-gcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,15 @@ jobs:
# Passes the disk name to subsequent jobs using `cached_disk_name` output
# Passes the state version to subsequent jobs using `state_version` output
#
get-test-cache:
name: Get ${{ inputs.test_id }} disk name
get-disk-name:
name: Get disk name
uses: ./.github/workflows/sub-find-cached-disks.yml
with:
network: ${{ inputs.network || vars.ZCASH_NETWORK }}
disk_prefix: ${{ inputs.needs_lwd_state && 'lwd-cache' || inputs.needs_zebra_state && 'zebrad-cache' }}
disk_suffix: ${{ inputs.disk_suffix }}
prefer_main_cached_state: ${{ inputs.prefer_main_cached_state }}
test_id: ${{ inputs.test_id }}

# Show all the test logs, then follow the logs of the test we just launched, until it finishes.
# Then check the result of the test.
Expand All @@ -126,14 +127,14 @@ jobs:
test-result:
name: Run ${{ inputs.test_id }} test
runs-on: zfnd-runners
needs: [ get-test-cache ]
needs: [ get-disk-name ]
if: ${{ !cancelled() && !failure() }}
timeout-minutes: ${{ inputs.is_long_test && 7200 || 180 }}
outputs:
cached_disk_name: ${{ needs.get-test-cache.outputs.cached_disk_name }}
state_version: ${{ needs.get-test-cache.outputs.state_version }}
cached_disk_name: ${{ needs.get-disk-name.outputs.cached_disk_name }}
state_version: ${{ needs.get-disk-name.outputs.state_version }}
env:
CACHED_DISK_NAME: ${{ needs.get-test-cache.outputs.cached_disk_name }}
CACHED_DISK_NAME: ${{ needs.get-disk-name.outputs.cached_disk_name }}
permissions:
contents: 'read'
id-token: 'write'
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/sub-find-cached-disks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ on:
prefer_main_cached_state:
required: false
type: boolean
test_id:
description: 'The test ID requiring the cached state disks'
required: false
type: string
outputs:
state_version:
description: 'The version of the cached state disks'
Expand All @@ -42,7 +46,7 @@ on:

jobs:
get-cached-disks:
name: Check ${{ inputs.network }} cached state
name: Get ${{ inputs.test_id || inputs.network }} cached disk
runs-on: ubuntu-latest
outputs:
state_version: ${{ steps.get-available-disks.outputs.state_version }}
Expand Down

0 comments on commit dea386c

Please sign in to comment.