[Rt-commit] rt branch, 4.4/github-actions-testing2, updated. rt-4.4.4-466-g554a778ac1

Jim Brandt jbrandt at bestpractical.com
Tue May 25 17:20:12 EDT 2021


The branch, 4.4/github-actions-testing2 has been updated
       via  554a778ac11982126c25908f9b4effc5ff3d64fc (commit)
      from  620e72009907b7ffba011a918aff776c755a67d7 (commit)

Summary of changes:
 .github/workflows/github-action.yml | 24 +++++++++++++++++++++---
 1 file changed, 21 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit 554a778ac11982126c25908f9b4effc5ff3d64fc
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Tue May 25 17:20:08 2021 -0400

    Calculate run time for postgres

diff --git a/.github/workflows/github-action.yml b/.github/workflows/github-action.yml
index d9e7f1cf22..1db00d4842 100644
--- a/.github/workflows/github-action.yml
+++ b/.github/workflows/github-action.yml
@@ -50,7 +50,7 @@ jobs:
           failure_text: '${env.RT_BRANCH_NAME} (${env.GITHUB_RUN_NUMBER}) tests failed in ${env.RT_GA_TEST_TIME}'
           cancelled_text: '${env.RT_BRANCH_NAME} (${env.GITHUB_RUN_NUMBER}) tests cancelled in ${env.RT_GA_TEST_TIME}'
           fields: |
-            [{ "title": "Test", "value": "rt_test_sqlite", "short": true },
+            [{ "title": "Test", "value": "${env.GITHUB_WORKFLOW}", "short": true },
             { "title": "URL", "value": "${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}?check_suite_focus=true", "short": true }]
   rt_test_mariadb:
     runs-on: ubuntu-latest
@@ -106,7 +106,7 @@ jobs:
           failure_text: '${env.RT_BRANCH_NAME} (${env.GITHUB_RUN_NUMBER}) tests failed in ${env.RT_GA_TEST_TIME}'
           cancelled_text: '${env.RT_BRANCH_NAME} (${env.GITHUB_RUN_NUMBER}) tests cancelled in ${env.RT_GA_TEST_TIME}'
           fields: |
-            [{ "title": "Test", "value": "rt_test_sqlite", "short": true },
+            [{ "title": "Test", "value": "${env.GITHUB_WORKFLOW}", "short": true },
             { "title": "URL", "value": "${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}?check_suite_focus=true", "short": true }]
   rt_test_postgresql_apache_mod_fcgid:
     runs-on: ubuntu-latest
@@ -135,8 +135,26 @@ jobs:
           docker exec rt bash -c "chown -R rt-user /rt; touch /etc/apache2/mime.types"
           docker exec -e USER=rt-user -u rt-user rt bash -c "cd /rt && ./configure.ac --with-db-type=Pg --with-my-user-group --enable-layout=inplace --with-web-handler=fcgid --enable-developer --enable-externalauth --enable-gpg --enable-smime && mkdir -p /rt/var && make testdeps && chmod a+rX /rt/sbin/*"
       - name: Run RT tests
+        env:
+          DB_VERSION_TAG: 9.6
+          RT_TEST_PARALLEL: 1
+          RT_TEST_WEB_HANDLER: apache+fcgid
+          HTTPD_ROOT: /etc/apache2
+          RT_TEST_APACHE: /usr/sbin/apache2
+          RT_TEST_APACHE_MODULES: /usr/lib/apache2/modules
         shell: bash
         run: docker exec -e RT_TEST_PARALLEL=1 -e RT_DBA_USER=postgres -e RT_DBA_PASSWORD=password -u rt-user rt bash -c "cd /rt && prove -lj6 t/*"
+      - name: Get run time
+        shell: bash
+        run: |
+          export RT_GA_END_TIME=$(date +%s)
+          echo RT_GA_START_TIME ${{ env.RT_GA_START_TIME }}
+          echo RT_GA_END_TIME $RT_GA_END_TIME
+          echo "RT_GA_END_TIME=$RT_GA_END_TIME" >> $GITHUB_ENV
+          export RT_GA_TEST_TIME=$(( RT_GA_END_TIME - ${{ env.RT_GA_START_TIME }} ))
+          # Convert seconds to HH::MM::SS
+          export RT_GA_TEST_TIME=$(date -u -d @"$RT_GA_TEST_TIME" +"%T")
+          echo "RT_GA_TEST_TIME=$RT_GA_TEST_TIME" >> $GITHUB_ENV
       - name: Post results to Slack
         if: always()
         uses: edge/simple-slack-notify at v1.1.1
@@ -149,5 +167,5 @@ jobs:
           failure_text: '${env.RT_BRANCH_NAME} (${env.GITHUB_RUN_NUMBER}) tests failed in ${env.RT_GA_TEST_TIME}'
           cancelled_text: '${env.RT_BRANCH_NAME} (${env.GITHUB_RUN_NUMBER}) tests cancelled in ${env.RT_GA_TEST_TIME}'
           fields: |
-            [{ "title": "Test", "value": "rt_test_sqlite", "short": true },
+            [{ "title": "Test", "value": "${env.GITHUB_WORKFLOW}", "short": true },
             { "title": "URL", "value": "${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}?check_suite_focus=true", "short": true }]

-----------------------------------------------------------------------


More information about the rt-commit mailing list