Improve formatting of article results in self service #1817
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#language: bash | |
#services: docker | |
on: | |
push: | |
branches-ignore: | |
- 'maint' | |
- 'stable' | |
jobs: | |
rt_test_sqlite: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up for tests | |
shell: bash | |
run: | | |
echo "RT_BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV | |
echo "RT_GA_START_TIME=$(date +%s)" >> $GITHUB_ENV | |
- name: Check out RT | |
uses: actions/checkout@v2 | |
- name: Build RT | |
env: | |
RT_TEST_PARALLEL: 1 | |
shell: bash | |
run: | | |
docker build -t rt-base . | |
docker run -d -v $GITHUB_WORKSPACE:/rt --name rt rt-base | |
docker ps -a | |
docker exec rt bash -c "cd /rt && ./configure.ac --with-db-type=SQLite --with-my-user-group --enable-layout=inplace --enable-developer --enable-externalauth --enable-gpg --enable-smime && mkdir -p /rt/var && make testdeps" | |
- name: Run RT tests | |
shell: bash | |
run: docker exec -e RT_TEST_PARALLEL=1 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/[email protected] | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFICATIONS }} | |
with: | |
channel: '#github' | |
status: ${{ job.status }} | |
success_text: '${env.RT_BRANCH_NAME} (${env.GITHUB_RUN_NUMBER}) tests completed successfully in ${env.RT_GA_TEST_TIME}' | |
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": "Configuration", "value": "RT Server, SQLite", "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 | |
steps: | |
- name: Set up for tests | |
shell: bash | |
run: | | |
echo "RT_BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV | |
echo "RT_GA_START_TIME=$(date +%s)" >> $GITHUB_ENV | |
- name: Checkout RT | |
uses: actions/checkout@v2 | |
- name: Build RT | |
env: | |
RT_TEST_PARALLEL: 1 | |
RT_DBA_USER: root | |
RT_DBA_PASSWORD: password | |
DB_VERSION_TAG: 10.3 | |
shell: bash | |
run: | | |
docker run --name mariadb -e MYSQL_ROOT_PASSWORD=password -d mariadb:$DB_VERSION_TAG | |
docker build -t rt-base . | |
docker run -d -v $GITHUB_WORKSPACE:/rt --name rt --link mariadb:db rt-base | |
docker ps -a | |
docker exec rt bash -c "cd /rt && ./configure.ac --with-db-type=mysql --with-my-user-group --enable-layout=inplace --enable-developer --enable-externalauth --enable-gpg --enable-smime && mkdir -p /rt/var && make testdeps" | |
- name: Run RT tests | |
env: | |
RT_TEST_PARALLEL: 1 | |
RT_DBA_USER: root | |
RT_DBA_PASSWORD: password | |
DB_VERSION_TAG: 10.3 | |
shell: bash | |
run: docker exec -e RT_TEST_PARALLEL=1 -e RT_DBA_USER=root -e RT_DBA_PASSWORD=password 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/[email protected] | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFICATIONS }} | |
with: | |
channel: '#github' | |
status: ${{ job.status }} | |
success_text: '${env.RT_BRANCH_NAME} (${env.GITHUB_RUN_NUMBER}) tests completed successfully in ${env.RT_GA_TEST_TIME}' | |
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": "Configuration", "value": "RT Server, MariaDB 10.3", "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 | |
steps: | |
- name: Set up for tests | |
shell: bash | |
run: | | |
echo "RT_BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV | |
echo "RT_GA_START_TIME=$(date +%s)" >> $GITHUB_ENV | |
- name: Checkout RT | |
uses: actions/checkout@v2 | |
- name: Build RT | |
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 run --name postgresql --mount type=tmpfs,destination=/var/lib/postgresql/data -e POSTGRES_PASSWORD=password -d postgres:$DB_VERSION_TAG | |
docker build -t rt-base . | |
docker run -d -v $GITHUB_WORKSPACE:/rt --name rt --link postgresql:db rt-base | |
docker ps -a | |
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/[email protected] | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFICATIONS }} | |
with: | |
channel: '#github' | |
status: ${{ job.status }} | |
success_text: '${env.RT_BRANCH_NAME} (${env.GITHUB_RUN_NUMBER}) tests completed successfully in ${env.RT_GA_TEST_TIME}' | |
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": "Configuration", "value": "Apache mod_fcgid, PostgreSQL 9.6", "short": true }, | |
{ "title": "URL", "value": "${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}?check_suite_focus=true", "short": true }] |