name: Interop Tests Common on: workflow_call: inputs: node1: required: true description: "Node that usually publishes messages. Used for all tests" type: string default: "wakuorg/go-waku:latest" node2: required: true description: "Node that usually queries for published messages. Used for all tests" type: string default: "wakuorg/nwaku:latest" additional_nodes: required: false description: "Additional optional nodes used in e2e tests, separated by ," type: string default: "wakuorg/nwaku:latest,wakuorg/go-waku:latest,wakuorg/nwaku:latest" caller: required: false description: "Workflow caller. Used in reporting" type: string env: FORCE_COLOR: "1" NODE_1: ${{ inputs.node1 }} NODE_2: ${{ inputs.node2 }} ADDITIONAL_NODES: ${{ inputs.additional_nodes }} CALLER: ${{ inputs.caller || 'manual' }} RLN_CREDENTIALS: ${{ secrets.RLN_CREDENTIALS }} jobs: tests: name: tests strategy: matrix: shard: [ 0,1,2,3,4,5,6,7 ,8,9,10,11,12] runs-on: ubuntu-latest timeout-minutes: 120 steps: - uses: actions/checkout@v4 - name: Remove unwanted software uses: ./.github/actions/prune-vm - uses: actions/setup-python@v4 with: python-version: '3.12' cache: 'pip' - run: pip install -r requirements.txt - name: Run tests run: | if [ "${{ matrix.shard }}" == 7 ]; then pytest --reruns 2 -k "test_get_multiple_2000_store_messages" -n 1 --maxfail=1 elif [ "${{ matrix.shard }}" == 1 ]; then pytest --dist=loadgroup tests/relay/test_rln.py -n 1 elif [ "${{ matrix.shard }}" != 1 ]; then pytest --dist=loadgroup --ignore=test_get_multiple_2000_store_messages --ignore=tests/relay/test_rln.py --reruns 2 -n=4 --shard-id=${{ matrix.shard }} --num-shards=13 --alluredir=allure-results fi - name: Get allure history if: always() uses: actions/checkout@v4 with: ref: gh-pages path: gh-pages - name: Setup allure report uses: simple-elf/allure-report-action@master if: always() id: allure-report with: allure_results: allure-results gh_pages: gh-pages/${{ env.CALLER }} allure_history: allure-history keep_reports: 30 report_url: https://waku-org.github.io/waku-interop-tests/${{ env.CALLER }} - name: Upload allure results if: always() uses: actions/upload-artifact@v4 with: name: allure-results-${{ matrix.shard }} path: allure-results/ - name: Create job summary if: always() env: JOB_STATUS: ${{ job.status }} run: | echo "## Run Information" >> $GITHUB_STEP_SUMMARY echo "- **Event**: ${{ github.event_name }}" >> $GITHUB_STEP_SUMMARY echo "- **Actor**: ${{ github.actor }}" >> $GITHUB_STEP_SUMMARY echo "- **Node1**: ${{ env.NODE_1 }}" >> $GITHUB_STEP_SUMMARY echo "- **Node2**: ${{ env.NODE_2 }}" >> $GITHUB_STEP_SUMMARY echo "- **Additonal Nodes**: ${{ env.ADDITIONAL_NODES }}" >> $GITHUB_STEP_SUMMARY echo "## Test Results" >> $GITHUB_STEP_SUMMARY echo "Allure report will be available at: https://waku-org.github.io/waku-interop-tests/${{ env.CALLER }}/${{ github.run_number }}" >> $GITHUB_STEP_SUMMARY if [ "$JOB_STATUS" != "success" ]; then echo "There are failures with nwaku node. cc <@&1111608257824440330>" >> $GITHUB_STEP_SUMMARY fi { echo 'JOB_SUMMARY<> $GITHUB_ENV - name: Send report to Discord uses: rjstone/discord-webhook-notify@v1 if: always() && env.CALLER != 'manual' with: severity: ${{ job.status == 'success' && 'info' || 'error' }} username: ${{ github.workflow }} description: "## Job Result: ${{ job.status }}" details: ${{ env.JOB_SUMMARY }} webhookUrl: ${{ secrets.DISCORD_TEST_REPORTS_WH }}