mirror of
https://github.com/logos-messaging/logos-delivery-interop-tests.git
synced 2026-06-05 14:29:27 +00:00
* Add docker mark for docker nodes tests * Add the ports allocation tests * trigger CI job * update the .so * chore: update logos-delivery-python-bindings * bump bindings submodule for fresh CI build * bump bindings to pull in logos-delivery #3828 * ci: pin nimble 0.22.3 to fix Nim checksum mismatch on liblogosdelivery build The "Build liblogosdelivery.so" job ran a bare `nimble install -y` inside the logos-delivery checkout, resolving the package's locked deps with whatever nimble choosenim ships. That nimble recomputes the locked Nim package checksum differently from the nimble that generated nimble.lock (0.22.3), so the build aborted with: Downloaded package checksum does not correspond to that in the lock file: Package: nim@v.2.2.4@r.911e0dbb... Expected checksum: 68bb85cb... Mirror logos-delivery's own CI: pin nimble 0.22.3 after installing Nim, and drop the redundant `nimble install -y` / no-op `make setup`. `make liblogosdelivery` already resolves the locked deps via its build-deps prerequisite (`nimble setup --localdeps`). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Bump bindings submodule to pull in logos-delivery latest master Points vendor/logos-delivery-python-bindings at the bump-logos-delivery-master branch (logos-delivery-python-bindings#6), which advances logos-delivery to master 4099ff26. Merge that bindings PR before this one so the pointer lands on bindings master. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Aya Hassan <ayahassan2877@gmail.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: AYAHASSAN287 <49167455+AYAHASSAN287@users.noreply.github.com>
290 lines
9.3 KiB
YAML
290 lines
9.3 KiB
YAML
name: PR Tests
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize, reopened, labeled]
|
|
paths:
|
|
- "src/**"
|
|
- "tests/**"
|
|
- "vendor/**"
|
|
- "requirements.txt"
|
|
- "pytest.ini"
|
|
- ".github/workflows/pr_tests.yml"
|
|
push:
|
|
branches: [master]
|
|
paths:
|
|
- "vendor/**"
|
|
workflow_dispatch:
|
|
inputs:
|
|
run_full_suite:
|
|
description: "Run the full test suite (18 shards)"
|
|
required: false
|
|
default: false
|
|
type: boolean
|
|
|
|
jobs:
|
|
build:
|
|
name: Build liblogosdelivery
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
if: >-
|
|
github.event.action != 'labeled' ||
|
|
github.event.label.name == 'full-test'
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Compute cache key
|
|
id: cache-key
|
|
run: |
|
|
BINDINGS_HASH=$(git rev-parse HEAD:vendor/logos-delivery-python-bindings)
|
|
DELIVERY_HASH=$(git -C vendor/logos-delivery-python-bindings rev-parse HEAD:vendor/logos-delivery)
|
|
echo "key=liblogosdelivery-${{ runner.os }}-nim2.2.4-v2-${BINDINGS_HASH}-${DELIVERY_HASH}" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Cache liblogosdelivery.so
|
|
id: cache-lib
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: vendor/logos-delivery-python-bindings/lib/liblogosdelivery.so
|
|
key: ${{ steps.cache-key.outputs.key }}
|
|
|
|
- name: Remove unwanted software
|
|
if: steps.cache-lib.outputs.cache-hit != 'true'
|
|
uses: ./.github/actions/prune-vm
|
|
|
|
- name: Install system deps
|
|
if: steps.cache-lib.outputs.cache-hit != 'true'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y \
|
|
util-linux \
|
|
iproute2 \
|
|
sudo \
|
|
ca-certificates \
|
|
curl \
|
|
make \
|
|
gcc \
|
|
g++
|
|
|
|
- name: Install Nim 2.2.4 and Nimble 0.22.3
|
|
if: steps.cache-lib.outputs.cache-hit != 'true'
|
|
run: |
|
|
set -euo pipefail
|
|
curl https://nim-lang.org/choosenim/init.sh -sSf | sh -s -- -y
|
|
echo "$HOME/.nimble/bin" >> "$GITHUB_PATH"
|
|
export PATH="$HOME/.nimble/bin:$PATH"
|
|
choosenim 2.2.4
|
|
# Pin the nimble that generated logos-delivery's nimble.lock. A newer
|
|
# nimble recomputes the locked Nim package checksum differently, which
|
|
# makes `nimble setup --localdeps` abort with a checksum mismatch.
|
|
(cd /tmp && nimble install "nimble@0.22.3" -y)
|
|
nim --version
|
|
nimble --version
|
|
|
|
- name: Build liblogosdelivery.so
|
|
if: steps.cache-lib.outputs.cache-hit != 'true'
|
|
run: |
|
|
set -euo pipefail
|
|
|
|
export PATH="$HOME/.nimble/bin:$PATH"
|
|
|
|
BINDINGS_DIR="$(pwd)/vendor/logos-delivery-python-bindings"
|
|
DELIVERY_DIR="$BINDINGS_DIR/vendor/logos-delivery"
|
|
|
|
mkdir -p "$BINDINGS_DIR/lib"
|
|
|
|
cd "$DELIVERY_DIR"
|
|
|
|
ln -sf waku.nimble waku.nims
|
|
|
|
# `make liblogosdelivery` resolves the locked deps via
|
|
# `nimble setup --localdeps` (build-deps prerequisite); a bare
|
|
# `nimble install -y` here is redundant and pulls Nim from the lock,
|
|
# which is what triggered the checksum mismatch.
|
|
make liblogosdelivery
|
|
|
|
SO_PATH="$(find . -type f -name 'liblogosdelivery.so' | head -n 1)"
|
|
|
|
if [ -z "$SO_PATH" ]; then
|
|
echo "liblogosdelivery.so was not built"
|
|
exit 1
|
|
fi
|
|
|
|
cp "$SO_PATH" "$BINDINGS_DIR/lib/liblogosdelivery.so"
|
|
|
|
echo "Built library:"
|
|
ls -l "$BINDINGS_DIR/lib/liblogosdelivery.so"
|
|
|
|
- name: Upload library artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: liblogosdelivery
|
|
path: vendor/logos-delivery-python-bindings/lib/liblogosdelivery.so
|
|
retention-days: 1
|
|
|
|
wrapper-tests:
|
|
name: Wrapper Tests
|
|
runs-on: ubuntu-latest
|
|
needs: [build]
|
|
timeout-minutes: 45
|
|
if: >-
|
|
github.event_name != 'push' &&
|
|
(github.event.action != 'labeled' || github.event.label.name == 'full-test')
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.12"
|
|
cache: "pip"
|
|
|
|
- run: pip install -r requirements.txt
|
|
|
|
- name: Download liblogosdelivery.so
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: liblogosdelivery
|
|
path: vendor/logos-delivery-python-bindings/lib/
|
|
|
|
- name: Run wrapper tests - basic life cycle
|
|
continue-on-error: true
|
|
env:
|
|
PYTHONPATH: ${{ github.workspace }}/vendor/logos-delivery-python-bindings/waku
|
|
run: |
|
|
pytest tests/wrappers_tests/test_basic_life_cycle.py \
|
|
-m "not docker_required" \
|
|
--reruns 2 \
|
|
--junit-xml=wrapper-results-basic.xml
|
|
|
|
- name: Run wrapper tests - send handle and subscription
|
|
continue-on-error: true
|
|
env:
|
|
PYTHONPATH: ${{ github.workspace }}/vendor/logos-delivery-python-bindings/waku
|
|
run: |
|
|
pytest tests/wrappers_tests/test_send_handle_and_subscription.py \
|
|
-m "not docker_required" \
|
|
--reruns 2 \
|
|
--junit-xml=wrapper-results-send-handle-and-subscription.xml
|
|
|
|
- name: Run wrapper tests - send relay propagation
|
|
continue-on-error: true
|
|
env:
|
|
PYTHONPATH: ${{ github.workspace }}/vendor/logos-delivery-python-bindings/waku
|
|
run: |
|
|
pytest tests/wrappers_tests/test_send_relay_propagation.py \
|
|
-m "not docker_required" \
|
|
--reruns 2 \
|
|
--junit-xml=wrapper-results-send-relay-propagation.xml
|
|
|
|
- name: Run wrapper tests - send lightpush and edge
|
|
continue-on-error: true
|
|
env:
|
|
PYTHONPATH: ${{ github.workspace }}/vendor/logos-delivery-python-bindings/waku
|
|
run: |
|
|
pytest tests/wrappers_tests/test_send_lightpush_and_edge.py \
|
|
-m "not docker_required" \
|
|
--reruns 2 \
|
|
--junit-xml=wrapper-results-send-lightpush-and-edge.xml
|
|
|
|
- name: Run wrapper tests - send errors and concurrency
|
|
continue-on-error: true
|
|
env:
|
|
PYTHONPATH: ${{ github.workspace }}/vendor/logos-delivery-python-bindings/waku
|
|
run: |
|
|
pytest tests/wrappers_tests/test_send_errors_and_concurrency.py \
|
|
-m "not docker_required" \
|
|
--reruns 2 \
|
|
--junit-xml=wrapper-results-send-errors-and-concurrency.xml
|
|
|
|
- name: Run wrapper tests - corner cases
|
|
continue-on-error: true
|
|
env:
|
|
PYTHONPATH: ${{ github.workspace }}/vendor/logos-delivery-python-bindings/waku
|
|
run: |
|
|
pytest tests/wrappers_tests/test_wrapper_corner_cases.py \
|
|
-m "not docker_required" \
|
|
--reruns 2 \
|
|
--junit-xml=wrapper-results-corner-cases.xml
|
|
|
|
- name: Test Report
|
|
if: always()
|
|
uses: dorny/test-reporter@95058abb17504553158e70e2c058fe1fda4392c2
|
|
with:
|
|
name: Wrapper Test Results
|
|
path: wrapper-results-*.xml
|
|
reporter: java-junit
|
|
use-actions-summary: "true"
|
|
|
|
smoke-tests:
|
|
name: Smoke Tests
|
|
runs-on: ubuntu-latest
|
|
needs: [build]
|
|
timeout-minutes: 30
|
|
if: >-
|
|
github.event_name != 'push' &&
|
|
(github.event.action != 'labeled' || github.event.label.name == 'full-test')
|
|
env:
|
|
NODE_1: "wakuorg/nwaku:latest"
|
|
NODE_2: "wakuorg/nwaku:latest"
|
|
ADDITIONAL_NODES: "wakuorg/nwaku:latest,wakuorg/nwaku:latest,wakuorg/nwaku:latest"
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.12"
|
|
cache: "pip"
|
|
|
|
- run: pip install -r requirements.txt
|
|
|
|
- name: Download liblogosdelivery.so
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: liblogosdelivery
|
|
path: vendor/logos-delivery-python-bindings/lib/
|
|
|
|
- name: Run smoke tests
|
|
env:
|
|
PYTHONPATH: ${{ github.workspace }}/vendor/logos-delivery-python-bindings/waku
|
|
run: |
|
|
pytest -m "smoke and not docker_required" \
|
|
--ignore=vendor/logos-delivery-python-bindings/tests \
|
|
--ignore=tests/wrappers_tests \
|
|
--reruns 1 \
|
|
-n 4 \
|
|
--dist=loadgroup \
|
|
--junit-xml=smoke-results.xml
|
|
|
|
- name: Test Report
|
|
if: always()
|
|
uses: dorny/test-reporter@95058abb17504553158e70e2c058fe1fda4392c2
|
|
with:
|
|
name: Smoke Test Results
|
|
path: smoke-results.xml
|
|
reporter: java-junit
|
|
use-actions-summary: "true"
|
|
|
|
full-suite:
|
|
name: Full Suite
|
|
if: >-
|
|
github.event_name != 'push' &&
|
|
(contains(github.event.pull_request.labels.*.name, 'full-test') ||
|
|
github.event.inputs.run_full_suite == 'true')
|
|
uses: ./.github/workflows/test_common.yml
|
|
secrets: inherit
|
|
with:
|
|
node1: "wakuorg/nwaku:latest"
|
|
node2: "wakuorg/nwaku:latest"
|
|
additional_nodes: "wakuorg/nwaku:latest,wakuorg/nwaku:latest,wakuorg/nwaku:latest"
|
|
caller: "pr"
|
|
deploy_allure: false
|
|
send_discord: false |