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: "24" 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