mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-02 13:53:12 +00:00
* chore: add throughput reliability tests * chore: add capability to run all * chore: add network-latency reliability tests * chore: add network-latency reliability tests * chore: add other network reliability tests * chore: add other network reliability tests * chore: fix tc cleanup * chore: refactor common code * chore: refactor common code * chore: refactor common code * chore: refactor common code * chore: refactor common code * chore: refactor common code * chore: refactor common code * chore: fix * chore: fix tests * chore: fix tests
107 lines
3.0 KiB
YAML
107 lines
3.0 KiB
YAML
name: Run Reliability Test
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
test_type:
|
|
description: 'Type of reliability test to run'
|
|
required: true
|
|
default: 'longevity'
|
|
type: choice
|
|
options:
|
|
- longevity
|
|
- high-throughput
|
|
- throughput-sizes
|
|
- network-latency
|
|
- low-bandwidth
|
|
- packet-loss
|
|
- all
|
|
|
|
env:
|
|
NODE_JS: "22"
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
actions: read
|
|
checks: write
|
|
strategy:
|
|
matrix:
|
|
test_type: [longevity, high-throughput, throughput-sizes, network-latency, low-bandwidth, packet-loss]
|
|
fail-fast: false
|
|
if: ${{ github.event.inputs.test_type == 'all' }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
repository: waku-org/js-waku
|
|
|
|
- name: Remove unwanted software
|
|
uses: ./.github/actions/prune-vm
|
|
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ env.NODE_JS }}
|
|
|
|
- uses: ./.github/actions/npm
|
|
|
|
- run: npm run build:esm
|
|
|
|
- name: Run tests
|
|
timeout-minutes: 150
|
|
run: |
|
|
if [ "${{ matrix.test_type }}" = "high-throughput" ]; then
|
|
npm run test:high-throughput
|
|
elif [ "${{ matrix.test_type }}" = "throughput-sizes" ]; then
|
|
npm run test:throughput-sizes
|
|
elif [ "${{ matrix.test_type }}" = "network-latency" ]; then
|
|
npm run test:network-latency
|
|
elif [ "${{ matrix.test_type }}" = "low-bandwidth" ]; then
|
|
npm run test:low-bandwidth
|
|
elif [ "${{ matrix.test_type }}" = "packet-loss" ]; then
|
|
npm run test:packet-loss
|
|
else
|
|
npm run test:longevity
|
|
fi
|
|
|
|
single-test:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
actions: read
|
|
checks: write
|
|
if: ${{ github.event.inputs.test_type != 'all' }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
repository: waku-org/js-waku
|
|
|
|
- name: Remove unwanted software
|
|
uses: ./.github/actions/prune-vm
|
|
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ env.NODE_JS }}
|
|
|
|
- uses: ./.github/actions/npm
|
|
|
|
- run: npm run build:esm
|
|
|
|
- name: Run tests
|
|
timeout-minutes: 150
|
|
run: |
|
|
if [ "${{ github.event.inputs.test_type }}" = "high-throughput" ]; then
|
|
npm run test:high-throughput
|
|
elif [ "${{ github.event.inputs.test_type }}" = "throughput-sizes" ]; then
|
|
npm run test:throughput-sizes
|
|
elif [ "${{ github.event.inputs.test_type }}" = "network-latency" ]; then
|
|
npm run test:network-latency
|
|
elif [ "${{ github.event.inputs.test_type }}" = "low-bandwidth" ]; then
|
|
npm run test:low-bandwidth
|
|
elif [ "${{ github.event.inputs.test_type }}" = "packet-loss" ]; then
|
|
npm run test:packet-loss
|
|
else
|
|
npm run test:longevity
|
|
fi
|