You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2022/01/22 15:26:12 UTC

[incubator-ponymail-foal] branch master updated: See if we can load a test email

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git


The following commit(s) were added to refs/heads/master by this push:
     new 1a859bd  See if we can load a test email
1a859bd is described below

commit 1a859bde73c6875ba899e6a7b5a84cd46419c83a
Author: Sebb <se...@apache.org>
AuthorDate: Sat Jan 22 15:26:06 2022 +0000

    See if we can load a test email
---
 .github/workflows/integration-tests.yml | 35 +++++++++++++++++++++++++++++++--
 1 file changed, 33 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml
index d3bd6c5..163146f 100644
--- a/.github/workflows/integration-tests.yml
+++ b/.github/workflows/integration-tests.yml
@@ -8,7 +8,7 @@ on:
   workflow_dispatch:
 
 jobs:
-  build:
+  setup:
     runs-on: ubuntu-latest
 
     services:
@@ -39,7 +39,8 @@ jobs:
       run: |
         python -m pip install --upgrade pip
         pip install -r tools/requirements.txt
-        pip install html2text # optional dependency, but needed for tests
+        pip install -r server/requirements.txt
+        # pip install html2text # optional dependency, but needed for tests
     - name: Basic test
       run: |
         curl -sq "http://localhost:9200/_cluster/health?level=indices&pretty"
@@ -53,3 +54,33 @@ jobs:
         curl -sq "http://localhost:9200/_settings?pretty"
         curl -sq "http://localhost:9200/ponymail-mbox/_mapping?pretty"
         curl -sq "http://localhost:9200/ponymail-source/_mapping?pretty"
+  background:
+    timeout-minutes: 5
+    runs-on: ubuntu-latest
+    needs: setup
+    steps:
+    - name: server
+      run: |
+        cd server
+        ./main --apilog INFO --logger INFO
+
+  tests:
+    runs-on: ubuntu-latest
+    needs: setup
+    steps:
+    - name: wait for background
+      run: |
+        sleep 10
+    - name: preferences1
+      run: |
+        curl -sq http://localhost:8080/api/preferences.lua
+    - name: load Database
+      run: |
+        tools/import-mbox.py --source tests/resources/rfc2822-A5.eml --lid a.b.c
+    - name: Show Database
+      run: |
+        curl -sq "http://localhost:9200/_cat/indices?v"
+    - name: preferences2
+      run: |
+        curl -sq http://localhost:8080/api/preferences.lua
+# TODO: ideally at the end of this job, stop the background job