Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Run E2E for single Python version | ||
|
Check failure on line 1 in .github/workflows/_run-e2e-single.yaml
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| python-version: | ||
| required: true | ||
| type: string | ||
| test-files: | ||
| required: true | ||
| type: string | ||
| image-name: | ||
| required: true | ||
| type: string | ||
| jobs: | ||
| run-fast-blocks-e2e: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 45 | ||
| strategy: | ||
| fail-fast: false | ||
| max-parallel: 64 | ||
| matrix: | ||
| name: "${{ matrix.test.label }} / Py ${{ inputs.python-version }}" | ||
| test: ${{ fromJson(inputs.test-files) }} | ||
| steps: | ||
| - name: Check-out repository | ||
| uses: actions/checkout@v4 | ||
| - name: Set up Python ${{ inputs.python-version }} | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{ inputs.python-version }} | ||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v4 | ||
| - name: Install dependencies | ||
| run: uv sync --extra dev --dev | ||
| - name: Download Cached Docker Image | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: subtensor-localnet | ||
| - name: Load Docker Image | ||
| run: docker load -i subtensor-localnet.tar | ||
| - name: Run tests with retry | ||
| env: | ||
| LOCALNET_IMAGE_NAME: ${{ inputs.image-name }} | ||
| run: | | ||
| for i in 1 2 3; do | ||
| echo "::group::🔁 Test attempt $i" | ||
| if uv run pytest "${{ matrix.test.nodeid }}" -s; then | ||
| echo "✅ Tests passed on attempt $i" | ||
| echo "::endgroup::" | ||
| exit 0 | ||
| else | ||
| echo "❌ Tests failed on attempt $i" | ||
| echo "::endgroup::" | ||
| if [ "$i" -lt 3 ]; then | ||
| echo "Retrying..." | ||
| sleep 5 | ||
| fi | ||
| fi | ||
| done | ||
| echo "Tests failed after 3 attempts" | ||
| exit 1 | ||