Skip to content

chore: divide workflows into reusable pieces #1

chore: divide workflows into reusable pieces

chore: divide workflows into reusable pieces #1

Workflow file for this run

on:
workflow_call:
outputs:
pid:
description: The PID of the running test validator
value: ${{ jobs.setup-validator.outputs.pid }}
secrets: inherit
jobs:
checkout:
uses: ./.github/workflows/checkout.yml@main

Check failure on line 11 in .github/workflows/validator-setup.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/validator-setup.yml

Invalid workflow file

invalid value workflow reference: cannot specify version when calling local workflows
setup-validator:
needs: checkout
name: Install & Start Test Validator
runs-on: ubuntu-latest
outputs:
pid: ${{ steps.test-validator.outputs.TEST_VALIDATOR_PID }}
steps:
- name: Get Test Validator Latest Release
id: get-test-validator-version
run: echo "version=$(./scripts/get-latest-validator-release-version.sh)" >> $GITHUB_OUTPUT
shell: bash
- name: Cache Test Validator
id: cache-test-validator
uses: actions/cache@v3
with:
path: .solana
key: ${{ runner.os }}-test-validator-${{ steps.get-test-validator-version.outputs.version }}
- name: Install Test Validator
if: steps.cache-test-validator.outputs.cache-hit != 'true'
run: scripts/setup-test-validator.sh
- name: Start Test Validator
id: test-validator
run: |
./scripts/start-shared-test-validator.sh &
echo "TEST_VALIDATOR_PID=$!" >> "$GITHUB_OUTPUT"