mirror of
https://github.com/logos-messaging/logos-messaging-interop-tests.git
synced 2026-01-02 14:03:08 +00:00
* Change number of threads for CI runners to 8 * change number of threads to 12 * Change number of threads to auto select * change number of threads to logical instead of auto * change number of threads to 150 * change total workers to 40 * Adding workflow_call in on section * remove "remove_unwanted_software" from yml * change path of requirements.txt * modify path of .txt file again * Change repo name * Create docker volume * Merge master to branch * Revert changes done in the branch * try the sharding option * Add pytest-shard 0.1.2 to requirements.txt * reduce shards to 2 * Fix max number of shards error * Modify pytest run command * change number of shards to =1 * increase shards to 4 * Modify pytest command * Change shards to 4 * skip 3 tests * skip rln tests * skip test metric * skip rln tests * fix skipif mark * Fix linters * Fix linters 2 * run pre-commit command to fix linters * Make each shard upload seperate report using artifacts * Change number of shards to 5 * CHange artifacts version to 4 * increase shards to 8 * Increase shards to 11 * Make test_get_multiple_2000_store_messages run in seperate shard * Mark test_get_multiple_2000_store_messages to run in shard 1 * using logic in yml file to run test_cursor.py in seperate file * Fix logic to run test_cursor.py in seperate shard * Adding path of file instead of file name in yml file * Fix error in pytest command * rerun test test_get_multiple_2000_store_messages * run test_get_multiple_2000_store_messages in separate shard * Fix error in pytest command * Fix command again by using -k instead of test name * Add test_rln.py again to job and increase shards to 13 * Run test_rln.py in single shard * Fix pytest command * Fix syntax error in pytest command * Increase workers to 4 * Create new test file for test_get_multiple_2000_store_messages * Collect reports into 1 report * Modify aggregate reports * Make changes to reports collecting * Add more reporting ways * Add send reports to discord again * Fix command syntax error * Revert changes * Make changes to fix not executed tests issue * remove 12 from matrix shards * Try to fix missing test issue by adding collect-only * Modify pytest command " remove collect only " * Increate timeout for test test_get_multiple_2000_store_messages * Reduce shards again to 8 * remove loadfile option * Increase shards to 22 * increase shards to 42 * Increase shards to 49 * Increase shards to 63 * Modify test command to have 16 shards * Change shards to 9 * Fix command of pytest * Using ignore instead of -m * Fix syntax error * Modify test file path * Increase shards to 16 * Modify test command * fix: add multiple machines * fix: prevent fail fast * Remove multiple skips * Revert changes in test_rln file * Modify test command fix: add multiple machines fix: prevent fail fast checkout on smoke_tests tag (#96) * checkout on smoke_tests tag * MOdify pytest command * Update README.md Add steps on how to use new tag for PR tests in readme file Remove multiple skips Revert changes in test_rln file * Adding timeout to test test_on_empty_postgress_db * Add comments in workflow for shards --------- Co-authored-by: fbarbu15 <florin@status.im> Co-authored-by: Florin Barbu <barbu_florin_adrian@yahoo.com>
151 lines
5.3 KiB
YAML
151 lines
5.3 KiB
YAML
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:
|
|
fail-fast: false
|
|
matrix:
|
|
shard: [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]
|
|
# total number of shards =18 means tests will split into 18 thread and run in parallel to increase execution speed
|
|
# command for sharding :
|
|
# pytest --shard-id=<shard_number> --num-shards=<total_shards>
|
|
# shard 16 for test_rln.py file as they shall run sequentially
|
|
# shard 17 for test_cursor_many_msgs.py as it takes time >7 mins
|
|
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 }}" == "16" ]; then
|
|
pytest tests/relay/test_rln.py --alluredir=allure-results-${{ matrix.shard }}
|
|
elif [ "${{ matrix.shard }}" == "17" ]; then
|
|
pytest tests/store/test_cursor_many_msgs.py --alluredir=allure-results-${{ matrix.shard }}
|
|
elif [ "${{ matrix.shard }}" != "17" ]; then
|
|
pytest --ignore=tests/relay/test_rln.py --ignore=tests/store/test_cursor_many_msgs.py --reruns 2 --shard-id=${{ matrix.shard }} --num-shards=16 --alluredir=allure-results-${{ matrix.shard }}
|
|
fi
|
|
|
|
- name: Upload allure results
|
|
if: always()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: allure-results-${{ matrix.shard }}
|
|
path: allure-results-${{ matrix.shard }}
|
|
|
|
|
|
|
|
aggregate-reports:
|
|
runs-on: ubuntu-latest
|
|
needs: tests
|
|
if: always()
|
|
steps:
|
|
- name: Download all allure results
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
path: all-results
|
|
merge-multiple: true
|
|
|
|
- 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: all-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: Deploy report to Github Pages
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
if: always()
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_branch: gh-pages
|
|
publish_dir: allure-history
|
|
destination_dir: ${{ env.CALLER }}
|
|
|
|
- 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<<EOF'
|
|
cat $GITHUB_STEP_SUMMARY
|
|
echo EOF
|
|
} >> $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 }} |