From faadf4c4e84ded7e6c7292569da43c7ab77bd9e8 Mon Sep 17 00:00:00 2001 From: David Buchanan Date: Mon, 2 Dec 2024 12:46:15 +0000 Subject: [PATCH] maybe-working ci test --- .github/workflows/test.yml | 17 +++++++++++++++++ tests/run_integration_test.sh | 21 +++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 .github/workflows/test.yml create mode 100755 tests/run_integration_test.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..d334862 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,17 @@ +name: Run tests +run-name: ${{ github.actor }} is running tests +on: push +jobs: + Tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: Install millipds python module + run: | + python3 -m pip install . + - name: Run the tests + run: | + ./tests/run_integration_test.sh diff --git a/tests/run_integration_test.sh b/tests/run_integration_test.sh new file mode 100755 index 0000000..4745171 --- /dev/null +++ b/tests/run_integration_test.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +set -euxo pipefail + +rm -rf ./data + +millipds init localhost:8123 +millipds account create did:plc:bwxddkvw5c6pkkntbtp2j4lx local.dev.retr0.id --unsafe_password="lol" + +millipds run & +PDS_PID=$! + +# wait for server to start up +until curl -s http://localhost:8123/ +do + echo "waiting for service startup" + sleep 0.05 +done + +python3 tests/integration_test.py +kill $PDS_PID