js-waku/.github/workflows/test-reliability.yml
fryorcraken b8a9d132c1
chore: npm publication (#2688)
* chore: npm publication

Fixing npm publication and warnings

* Upgrade workflow to use trusted publishing

https://docs.npmjs.com/trusted-publishers

* bump node js to 24

To avoid having to reinstall npm in pre-release for npmjs trusted publishers
2025-10-21 16:35:01 +11:00

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