mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-07-29 19:43:16 +00:00
ci: run docker subset of the API/e2e wrapper tests (#4052)
* Add in-repo API/e2e test suite (tests-e2e) Migrate the liblogosdelivery API/wrapper pytest suite into tests-e2e/ and run it in CI (e2e-api-tests.yml) against the built library. Edge senders use the real lightpush path (relay=False). * ci: run docker subset of the API/e2e wrapper tests Parametrize e2e-api-tests.yml with `subset` (non-docker|docker) and `node_image` inputs, and add a send-api-e2e-docker-tests job that runs the docker_required wrapper tests (S19/S20/S31) against the built node image. The docker job needs both the liblogosdelivery artifact and the container-image build, and skips when no image is available (fork PRs lack the registry secrets). The non-docker subset still needs only `build`, so a docker-image build failure cannot mask its result. * ci: run docker e2e subset on fork PRs against a pinned public image Drop the gate that skipped the docker subset when no PR-built node image is available. Fork PRs lack the quay secrets, so build-docker-image succeeds with an empty output and the subset now falls back to DEFAULT_NWAKU instead of being skipped. Pin DEFAULT_NWAKU to wakuorg/nwaku:v0.38.1. The rolling :latest tag is a daily upstream master build and currently fails to boot with "updateAddressInENR: Public key does not correspond with given private key", which would have made the subset permanently red on fork PRs. s31 passes against v0.38.1 and against the PR-built image. Echo the resolved peer image at the start of the test step. The job name is left static so the check can still be made required.
This commit is contained in:
parent
b5f624f519
commit
26e1d62524
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
@ -213,6 +213,17 @@ jobs:
|
||||
send-api-e2e-tests:
|
||||
needs: build
|
||||
uses: ./.github/workflows/e2e-api-tests.yml
|
||||
with:
|
||||
subset: non-docker
|
||||
secrets: inherit
|
||||
|
||||
# Docker subset; an empty node_image falls back to DEFAULT_NWAKU (fork PRs lack the quay secrets).
|
||||
send-api-e2e-docker-tests:
|
||||
needs: [build, build-docker-image]
|
||||
uses: ./.github/workflows/e2e-api-tests.yml
|
||||
with:
|
||||
subset: docker
|
||||
node_image: ${{ needs.build-docker-image.outputs.image }}
|
||||
secrets: inherit
|
||||
|
||||
lint:
|
||||
|
||||
19
.github/workflows/e2e-api-tests.yml
vendored
19
.github/workflows/e2e-api-tests.yml
vendored
@ -2,12 +2,25 @@ name: e2e-api-tests
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
subset:
|
||||
description: "Which wrapper subset to run: 'non-docker' or 'docker'."
|
||||
type: string
|
||||
required: false
|
||||
default: "non-docker"
|
||||
node_image:
|
||||
description: "Node image used for the docker peers (docker subset only)."
|
||||
type: string
|
||||
required: false
|
||||
default: ""
|
||||
|
||||
jobs:
|
||||
api-e2e:
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 45
|
||||
name: api-e2e
|
||||
env:
|
||||
NODE_2: ${{ inputs.node_image }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
@ -29,6 +42,8 @@ jobs:
|
||||
- name: Install Python deps
|
||||
run: pip install -r tests-e2e/requirements.txt
|
||||
|
||||
- name: Run API/e2e tests (non-docker subset)
|
||||
- name: Run API/e2e tests (${{ inputs.subset }} subset)
|
||||
working-directory: tests-e2e
|
||||
run: pytest tests/wrappers_tests -m "not docker_required" --reruns 2
|
||||
run: |
|
||||
echo "docker peer image: ${NODE_2:-public default (DEFAULT_NWAKU)}"
|
||||
pytest tests/wrappers_tests -m "${{ inputs.subset == 'docker' && 'docker_required' || 'not docker_required' }}" --reruns 2
|
||||
|
||||
@ -14,7 +14,7 @@ def get_env_var(var_name, default=None):
|
||||
|
||||
|
||||
# Configuration constants. Need to be upercase to appear in reports
|
||||
DEFAULT_NWAKU = "wakuorg/nwaku:latest"
|
||||
DEFAULT_NWAKU = "wakuorg/nwaku:v0.38.1"
|
||||
STRESS_ENABLED = False
|
||||
USE_WRAPPERS = True
|
||||
NODE_1 = get_env_var("NODE_1", DEFAULT_NWAKU)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user