feat(hole-punch): add py-libp2p v0.5 #44
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: Hole Punch Interoperability Tests (PR) | |
| on: | |
| pull_request: | |
| paths: | |
| - 'hole-punch/**' | |
| - '.github/actions/detect-changed-impls/**' | |
| - '.github/actions/run-bash-hole-punch-test/**' | |
| - '.github/workflows/hole-punch-interop-pr.yml' | |
| workflow_dispatch: | |
| inputs: | |
| test-select: | |
| description: 'Select specific tests (pipe-separated substrings)' | |
| required: false | |
| default: '' | |
| type: string | |
| test-ignore: | |
| description: 'Ignore specific tests (pipe-separated substrings)' | |
| required: false | |
| default: '~failing' | |
| type: string | |
| relay-select: | |
| description: 'Select specific relays (pipe-separated substrings)' | |
| required: false | |
| default: '' | |
| type: string | |
| relay-ignore: | |
| description: 'Ignore specific relays (pipe-separated substrings)' | |
| required: false | |
| default: '~failing' | |
| type: string | |
| router-select: | |
| description: 'Select specific routers (pipe-separated substrings)' | |
| required: false | |
| default: '' | |
| type: string | |
| router-ignore: | |
| description: 'Ignore specific routers (pipe-separated substrings)' | |
| required: false | |
| default: '' | |
| type: string | |
| force-matrix-rebuild: | |
| description: 'Force test matrix regeneration (bypass cache)' | |
| required: false | |
| default: false | |
| type: boolean | |
| force-image-rebuild: | |
| description: 'Force Docker image rebuilds (bypass cache)' | |
| required: false | |
| default: false | |
| type: boolean | |
| debug: | |
| description: 'Enable debug mode (sets DEBUG=true in test containers)' | |
| required: false | |
| default: false | |
| type: boolean | |
| snapshot: | |
| description: 'Create and upload test snapshot for debugging' | |
| required: false | |
| default: true | |
| type: boolean | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| resolve-parameters: | |
| runs-on: [self-hosted, linux, x64, ephemeral] | |
| outputs: | |
| test-select: ${{ steps.resolve.outputs.test-select }} | |
| test-ignore: ${{ steps.resolve.outputs.test-ignore }} | |
| relay-select: ${{ steps.resolve.outputs.relay-select }} | |
| relay-ignore: ${{ steps.resolve.outputs.relay-ignore }} | |
| router-select: ${{ steps.resolve.outputs.router-select }} | |
| router-ignore: ${{ steps.resolve.outputs.router-ignore }} | |
| force-matrix-rebuild: ${{ steps.resolve.outputs.force-matrix-rebuild }} | |
| force-image-rebuild: ${{ steps.resolve.outputs.force-image-rebuild }} | |
| debug: ${{ steps.resolve.outputs.debug }} | |
| snapshot: ${{ steps.resolve.outputs.snapshot }} | |
| should-run-tests: ${{ steps.resolve.outputs.should-run-tests }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Detect changed implementations/relays/routers | |
| if: github.event_name != 'workflow_dispatch' | |
| id: detect | |
| uses: ./.github/actions/detect-changed-impls | |
| with: | |
| test-type: hole-punch | |
| - name: Resolve parameters | |
| id: resolve | |
| shell: bash | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| # Manual trigger - use workflow inputs | |
| echo "test-select=${{ github.event.inputs.test-select }}" >> $GITHUB_OUTPUT | |
| echo "test-ignore=${{ github.event.inputs.test-ignore }}" >> $GITHUB_OUTPUT | |
| echo "relay-select=${{ github.event.inputs.relay-select }}" >> $GITHUB_OUTPUT | |
| echo "relay-ignore=${{ github.event.inputs.relay-ignore }}" >> $GITHUB_OUTPUT | |
| echo "router-select=${{ github.event.inputs.router-select }}" >> $GITHUB_OUTPUT | |
| echo "router-ignore=${{ github.event.inputs.router-ignore }}" >> $GITHUB_OUTPUT | |
| echo "force-matrix-rebuild=${{ github.event.inputs.force-matrix-rebuild }}" >> $GITHUB_OUTPUT | |
| echo "force-image-rebuild=${{ github.event.inputs.force-image-rebuild }}" >> $GITHUB_OUTPUT | |
| echo "debug=${{ github.event.inputs.debug }}" >> $GITHUB_OUTPUT | |
| echo "snapshot=${{ github.event.inputs.snapshot }}" >> $GITHUB_OUTPUT | |
| echo "should-run-tests=true" >> $GITHUB_OUTPUT | |
| echo "→ Manual trigger: using workflow inputs" | |
| else | |
| # Automatic trigger - use change detection outputs | |
| echo "test-select=${{ steps.detect.outputs.changed-impls }}" >> $GITHUB_OUTPUT | |
| # Negate each implementation ID in the pipe-separated list | |
| # Always include ~failing to skip known-broken tests | |
| CHANGED_IMPLS="${{ steps.detect.outputs.changed-impls }}" | |
| if [ -n "$CHANGED_IMPLS" ]; then | |
| NEGATED_IMPLS=$(echo "$CHANGED_IMPLS" | sed 's/|/|!/g;s/^/!/') | |
| echo "test-ignore=~failing|$NEGATED_IMPLS" >> $GITHUB_OUTPUT | |
| else | |
| echo "test-ignore=~failing" >> $GITHUB_OUTPUT | |
| fi | |
| echo "relay-select=${{ steps.detect.outputs.changed-relays }}" >> $GITHUB_OUTPUT | |
| # Negate each relay ID in the pipe-separated list | |
| # Always include ~failing to skip known-broken relays | |
| CHANGED_RELAYS="${{ steps.detect.outputs.changed-relays }}" | |
| if [ -n "$CHANGED_RELAYS" ]; then | |
| NEGATED_RELAYS=$(echo "$CHANGED_RELAYS" | sed 's/|/|!/g;s/^/!/') | |
| echo "relay-ignore=~failing|$NEGATED_RELAYS" >> $GITHUB_OUTPUT | |
| else | |
| echo "relay-ignore=~failing" >> $GITHUB_OUTPUT | |
| fi | |
| echo "router-select=${{ steps.detect.outputs.changed-routers }}" >> $GITHUB_OUTPUT | |
| # Negate each router ID in the pipe-separated list | |
| # Always include ~failing to skip known-broken routers | |
| CHANGED_ROUTERS="${{ steps.detect.outputs.changed-routers }}" | |
| if [ -n "$CHANGED_ROUTERS" ]; then | |
| NEGATED_ROUTERS=$(echo "$CHANGED_ROUTERS" | sed 's/|/|!/g;s/^/!/') | |
| echo "router-ignore=~failing|$NEGATED_ROUTERS" >> $GITHUB_OUTPUT | |
| else | |
| echo "router-ignore=~failing" >> $GITHUB_OUTPUT | |
| fi | |
| echo "force-matrix-rebuild=${{ steps.detect.outputs.impls-yaml-changed }}" >> $GITHUB_OUTPUT | |
| echo "force-image-rebuild=${{ steps.detect.outputs.images-folder-changed }}" >> $GITHUB_OUTPUT | |
| echo "debug=false" >> $GITHUB_OUTPUT | |
| echo "snapshot=true" >> $GITHUB_OUTPUT | |
| echo "should-run-tests=${{ steps.detect.outputs.has-changes }}" >> $GITHUB_OUTPUT | |
| echo "→ Automatic trigger: using change detection outputs" | |
| fi | |
| run-tests: | |
| needs: resolve-parameters | |
| if: needs.resolve-parameters.outputs.should-run-tests == 'true' | |
| runs-on: [self-hosted, linux, x64, ephemeral] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Run hole punch interop tests | |
| uses: ./.github/actions/run-bash-hole-punch-test | |
| with: | |
| test-select: '${{ needs.resolve-parameters.outputs.test-select }}' | |
| test-ignore: '${{ needs.resolve-parameters.outputs.test-ignore }}' | |
| relay-select: '${{ needs.resolve-parameters.outputs.relay-select }}' | |
| relay-ignore: '${{ needs.resolve-parameters.outputs.relay-ignore }}' | |
| router-select: '${{ needs.resolve-parameters.outputs.router-select }}' | |
| router-ignore: '${{ needs.resolve-parameters.outputs.router-ignore }}' | |
| cache-dir: /srv/cache | |
| snapshot: ${{ needs.resolve-parameters.outputs.snapshot }} | |
| force-matrix-rebuild: ${{ needs.resolve-parameters.outputs.force-matrix-rebuild }} | |
| force-image-rebuild: ${{ needs.resolve-parameters.outputs.force-image-rebuild }} | |
| debug: ${{ needs.resolve-parameters.outputs.debug }} |