Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/ci-experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ jobs:
timeout-minutes: 60

name: test-v2-${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -106,4 +107,8 @@ jobs:
key: ${{ runner.os }}-vendor-modules-${{ steps.submodules.outputs.hash }}

- name: Run tests
run: make V=1 LOG_LEVEL=DEBUG QUICK_AND_DIRTY_COMPILER=1 test2 testwakunode2
run: |
if [ ${{ runner.os }} -eq ubuntu-latest ]; then
sudo docker run --rm -d -e POSTGRES_PASSWORD=test123 -p 5432:5432 postgres:9.6-alpine
fi
make V=1 LOG_LEVEL=DEBUG QUICK_AND_DIRTY_COMPILER=1 test2 testwakunode2
12 changes: 9 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ jobs:
v2: ${{ steps.filter.outputs.v2 }}
legacy: ${{ steps.filter.outputs.legacy }}


build-v2:
needs: changes
if: ${{ needs.changes.outputs.v2 == 'true' || needs.changes.outputs.common == 'true' }}
Expand Down Expand Up @@ -115,8 +114,15 @@ jobs:
key: ${{ runner.os }}-vendor-modules-${{ steps.submodules.outputs.hash }}

- name: Run tests
run: make V=1 LOG_LEVEL=DEBUG QUICK_AND_DIRTY_COMPILER=1 test2 testwakunode2

run: |
if [ ${{ runner.os }} == "Linux" ]; then
echo "AAAA "
sudo docker run --rm -d -e POSTGRES_PASSWORD=test123 -p 5432:5432 postgres:9.6-alpine
fi
echo "AAAA 1"
. env.sh
nim c -r -d:chronicles_log_level=WARN --verbosity=0 --hints=off --outdir=build ./tests/v2/waku_archive/test_driver_postgres.nim
#make V=1 LOG_LEVEL=DEBUG QUICK_AND_DIRTY_COMPILER=1 test2 testwakunode2

build-legacy:
needs: changes
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ testcommon: | build deps

testwaku2: | build deps librln
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim test2 $(NIM_PARAMS) $(EXPERIMENTAL_PARAMS) waku.nims
$(ENV_SCRIPT) nim test2 -d:os=$(shell uname) $(NIM_PARAMS) $(EXPERIMENTAL_PARAMS) waku.nims

wakunode2: | build deps librln
echo -e $(BUILD_MSG) "build/$@" && \
Expand Down
9 changes: 6 additions & 3 deletions tests/all_tests_v2.nim
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@ import
./v2/waku_archive/test_retention_policy,
./v2/waku_archive/test_waku_archive

# TODO: add the postgres test when we can mock the database.
# The postgres tests now need a running postgresql database running locally.
# ./v2/waku_archive/test_driver_postgres,
const os* {.strdefine.} = ""
when os == "Linux":
# GitHub only supports container actions on Linux
# and we need to start a postgress database in a docker container
import
./v2/waku_archive/test_driver_postgres

# Waku store test suite
import
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
version: "3.8"


services:
db:
image: postgres:9.6-alpine
Expand Down