Skip to content

Fixed mixed up content types for article body and signature in generi… #2029

Fixed mixed up content types for article body and signature in generi…

Fixed mixed up content types for article body and signature in generi… #2029

Workflow file for this run

---
name: CI
# Controls when the action will run.
on:
push:
pull_request:
workflow_dispatch:
inputs:
unittest_options:
description: 'Execute UnitTests with these options. e.g. --test scripts/test/Ticket'
default: ''
required: false
type: string
jobs:
ZnunyCodePolicy:
name: ZnunyCodePolicy
runs-on: ubuntu-latest
container: debian:10-slim
steps:
- name: Check out repository code
uses: actions/checkout@v3
env:
fetch-depth: "1"
with:
path: znuny
- name: Check out code policy
uses: actions/checkout@v3
env:
fetch-depth: "1"
with:
repository: znuny/ZnunyCodePolicy
path: codepolicy
- name: Install dependencies
run: znuny/.github/workflows/ci/dependencies.sh
- name: Prepare code policy
run: |
cpanm --verbose Algorithm::Diff Code::TidyAll Perl::Critic Perl::Tidy Pod::POM XML::Parser
codepolicy/bin/znuny.CodePolicy.pl --install-eslint
- name: Run code policy
run: |
cd "${GITHUB_WORKSPACE}/znuny"
git init
"${GITHUB_WORKSPACE}/codepolicy/bin/znuny.CodePolicy.pl" --all-files --mode ci
Contributors:
name: Contributors
runs-on: ubuntu-latest
container: debian:10-slim
steps:
- name: Check out repository code
uses: actions/checkout@v3
env:
fetch-depth: "0"
- name: Install dependencies
run: .github/workflows/ci/dependencies.sh
- name: Setup Znuny
run: .github/workflows/ci/setup.sh
- name: Check Contributors
run: |
git init
git config --global --add safe.directory ${GITHUB_WORKSPACE}
su -c "bin/znuny.Console.pl Dev::Code::ContributorsListUpdate" - znuny
if [ "$(git diff --exit-code AUTHORS.md)" ]; then echo 'The ContributorsList is not updated.' && exit 1; else echo 'The ContributorsList is updated.' && exit 0; fi
Database-Schema:
name: Database:Schema
runs-on: ubuntu-latest
container: debian:10-slim
steps:
- name: Check out repository code
uses: actions/checkout@v3
env:
fetch-depth: "1"
- name: Install dependencies
run: .github/workflows/ci/dependencies.sh
- name: Setup Znuny
run: .github/workflows/ci/setup.sh
- name: Check Database:Schema
run: |
git init
git config --global --add safe.directory ${GITHUB_WORKSPACE}
SCHEMA_FILE=$(find scripts/database -type f -name '*schema.xml')
SCHEMA_FILE_NAME=$(find scripts/database -type f -name '*schema.xml' | cut -d/ -f3- | sed 's/\.xml$//')
echo "Found schema file $SCHEMA_FILE"
echo "Found schema file name $SCHEMA_FILE_NAME"
su -c "bin/znuny.Console.pl Dev::Tools::Database::XML2SQL --database-type=all --source-path=${SCHEMA_FILE} --target-directory=scripts/database --target-filename=$SCHEMA_FILE_NAME --split-files" - znuny
git diff --exit-code scripts/database/*schema*
if [ "$(git diff --exit-code scripts/database/*schema*)" ]; then echo 'The database schemas are not updated.' && exit 1; else echo 'All database schemas are updated.' && exit 0; fi
Database-InitialInsert:
name: Database:InitialInsert
runs-on: ubuntu-latest
container: debian:10-slim
steps:
- name: Check out repository code
uses: actions/checkout@v3
env:
fetch-depth: "1"
- name: Install dependencies
run: .github/workflows/ci/dependencies.sh
- name: Setup Znuny
run: .github/workflows/ci/setup.sh
- name: Check Database:InitialInsert
run: |
git init
git config --global --add safe.directory ${GITHUB_WORKSPACE}
INITIAL_INSERT_FILE=$(find scripts/database -type f -name '*initial_insert.xml')
INITIAL_INSERT_FILE_NAME=$(find scripts/database -type f -name '*initial_insert.xml' | cut -d/ -f3- | sed 's/\.xml$//')
echo "Found initial insert file $INITIAL_INSERT_FILE"
echo "Found initial insert file name $INITIAL_INSERT_FILE_NAME"
su -c "bin/znuny.Console.pl Dev::Tools::Database::XML2SQL --database-type=all --source-path=$INITIAL_INSERT_FILE --target-directory=scripts/database --target-filename=$INITIAL_INSERT_FILE_NAME" - znuny
git diff --exit-code scripts/database/*initial_insert*
if [ "$(git diff --exit-code scripts/database/*initial_insert*)" ]; then echo 'The database initial inserts are not updated.' && exit 1; else echo 'All database initial inserts are updated.' && exit 0; fi
Migration:
name: Migration
runs-on: ubuntu-latest
container: debian:10-slim
env:
DB: mysql
MYSQL_USER: "znuny"
MYSQL_ROOT_PASSWORD: "secret"
MYSQL_PASSWORD: "secret"
MYSQL_DATABASE: "znuny"
services:
mariadb:
image: mariadb:10
env:
MYSQL_USER: "znuny"
MYSQL_ROOT_PASSWORD: "secret"
MYSQL_PASSWORD: "secret"
MYSQL_DATABASE: "znuny"
steps:
- name: Check out repository code
uses: actions/checkout@v3
env:
fetch-depth: "1"
- name: Install dependencies
run: .github/workflows/ci/dependencies.sh
- name: Setup Znuny
run: .github/workflows/ci/setup.sh
- name: Check Migration
run: |
MIGRATEFILE=$(find scripts -type f -name 'MigrateToZnuny*.pl' -or -type f -name 'DBUpdate-to-*.pl')
su -c "$MIGRATEFILE --non-interactive" - znuny
if [ "$?" -ne 0 ]; then echo "The migration was not successful." && exit 1; else echo "The migration was successful." && exit 0; fi
RPMSpec:
name: RPMSpec
runs-on: ubuntu-latest
container: debian:10-slim
env:
DB: mysql
MYSQL_USER: "znuny"
MYSQL_ROOT_PASSWORD: "secret"
MYSQL_PASSWORD: "secret"
MYSQL_DATABASE: "znuny"
services:
mariadb:
image: mariadb:10
env:
MYSQL_USER: "znuny"
MYSQL_ROOT_PASSWORD: "secret"
MYSQL_PASSWORD: "secret"
MYSQL_DATABASE: "znuny"
steps:
- name: Check out repository code
uses: actions/checkout@v3
env:
fetch-depth: "1"
- name: Install dependencies
run: .github/workflows/ci/dependencies.sh
- name: Setup Znuny
run: .github/workflows/ci/setup.sh
- name: Check RPMSpec
run: |
git init
git config --global --add safe.directory ${GITHUB_WORKSPACE}
su -c "bin/znuny.Console.pl Dev::Tools::RPMSpecGenerate" - znuny
git diff --exit-code scripts/auto_build/spec/
if [ "$(git diff --exit-code scripts/auto_build/spec/)" ]; then echo "The RPMSpec's are not updated." && exit 1; else echo "All RPMSpec's are updated." && exit 0; fi
UnitTest-MySQL:
name: UnitTest:MySQL
runs-on: ubuntu-latest
container: debian:10-slim
needs: [
ZnunyCodePolicy,
Contributors,
Database-Schema,
Database-InitialInsert,
Migration,
RPMSpec,
]
env:
DB: mysql
MYSQL_USER: "znuny"
MYSQL_ROOT_PASSWORD: "secret"
MYSQL_PASSWORD: "secret"
MYSQL_DATABASE: "znuny"
services:
mariadb:
image: mariadb:10
env:
MYSQL_USER: "znuny"
MYSQL_ROOT_PASSWORD: "secret"
MYSQL_PASSWORD: "secret"
MYSQL_DATABASE: "znuny"
steps:
- name: Check out repository code
uses: actions/checkout@v3
env:
fetch-depth: "1"
- name: Install dependencies
run: .github/workflows/ci/dependencies.sh
- name: Setup Znuny
run: .github/workflows/ci/setup.sh
- name: Run UnitTests
run: |
su -c "bin/znuny.CheckSum.pl -a create" - znuny
su -c "bin/znuny.Console.pl Dev::UnitTest::Run ${{ inputs.unittest_options }} --exclude-directory Selenium" - znuny
Selenium-Base:
name: Selenium:Base
runs-on: ubuntu-latest
container: debian:10-slim
needs: UnitTest-MySQL
env:
DB: mysql
MYSQL_USER: "znuny"
MYSQL_ROOT_PASSWORD: "secret"
MYSQL_PASSWORD: "secret"
MYSQL_DATABASE: "znuny"
SELENIUM_SCREENSHOTS: "true"
services:
mariadb:
image: mariadb:10
env:
MYSQL_USER: "znuny"
MYSQL_ROOT_PASSWORD: "secret"
MYSQL_PASSWORD: "secret"
MYSQL_DATABASE: "znuny"
chrome:
image: selenium/standalone-chrome:3.141.59-oxygen
options: --shm-size="2g"
volumes:
- ${{ github.workspace }}:/opt/znuny
steps:
- name: Check out repository code
uses: actions/checkout@v3
env:
fetch-depth: "1"
- name: Install dependencies
run: .github/workflows/ci/dependencies.sh
- name: Setup Znuny
run: .github/workflows/ci/setup.sh
- name: Run UnitTests
run: |
su -c "bin/znuny.CheckSum.pl -a create" - znuny
su -c "bin/znuny.Console.pl Dev::UnitTest::Run --directory Selenium/Base" - znuny
- name: Archive screenshots from selenium
if: failure()
uses: actions/upload-artifact@v3
with:
name: Download all selenium screenshots
retention-days: 1
path: /opt/znuny/var/httpd/htdocs/SeleniumScreenshots/**/*
if-no-files-found: ignore
Selenium-Admin:
name: Selenium:Admin
runs-on: ubuntu-latest
container: debian:10-slim
needs: UnitTest-MySQL
env:
DB: mysql
MYSQL_USER: "znuny"
MYSQL_ROOT_PASSWORD: "secret"
MYSQL_PASSWORD: "secret"
MYSQL_DATABASE: "znuny"
SELENIUM_SCREENSHOTS: "true"
services:
mariadb:
image: mariadb:10
env:
MYSQL_USER: "znuny"
MYSQL_ROOT_PASSWORD: "secret"
MYSQL_PASSWORD: "secret"
MYSQL_DATABASE: "znuny"
chrome:
image: selenium/standalone-chrome:3.141.59-oxygen
options: --shm-size="2g"
volumes:
- ${{ github.workspace }}:/opt/znuny
steps:
- name: Check out repository code
uses: actions/checkout@v3
env:
fetch-depth: "1"
- name: Install dependencies
run: .github/workflows/ci/dependencies.sh
- name: Setup Znuny
run: .github/workflows/ci/setup.sh
- name: Run UnitTests
run: |
su -c "bin/znuny.CheckSum.pl -a create" - znuny
su -c "bin/znuny.Console.pl Dev::UnitTest::Run --directory Selenium/Agent/Admin" - znuny
- name: Archive screenshots from selenium
if: failure()
uses: actions/upload-artifact@v3
with:
name: Download all selenium screenshots
retention-days: 1
path: /opt/znuny/var/httpd/htdocs/SeleniumScreenshots/**/*
if-no-files-found: ignore
Selenium-Agent:
name: Selenium:Agent
runs-on: ubuntu-latest
container: debian:10-slim
needs: UnitTest-MySQL
env:
DB: mysql
MYSQL_USER: "znuny"
MYSQL_ROOT_PASSWORD: "secret"
MYSQL_PASSWORD: "secret"
MYSQL_DATABASE: "znuny"
SELENIUM_SCREENSHOTS: "true"
services:
mariadb:
image: mariadb:10
env:
MYSQL_USER: "znuny"
MYSQL_ROOT_PASSWORD: "secret"
MYSQL_PASSWORD: "secret"
MYSQL_DATABASE: "znuny"
chrome:
image: selenium/standalone-chrome:3.141.59-oxygen
options: --shm-size="2g"
volumes:
- ${{ github.workspace }}:/opt/znuny
steps:
- name: Check out repository code
uses: actions/checkout@v3
env:
fetch-depth: "1"
- name: Install dependencies
run: .github/workflows/ci/dependencies.sh
- name: Setup Znuny
run: .github/workflows/ci/setup.sh
- name: Run UnitTests
run: |
su -c "bin/znuny.CheckSum.pl -a create" - znuny
su -c "bin/znuny.Console.pl Dev::UnitTest::Run --directory Selenium/Agent --exclude-directory Selenium/Agent/Admin" - znuny
- name: Archive screenshots from selenium
if: failure()
uses: actions/upload-artifact@v3
with:
name: Download all selenium screenshots
retention-days: 1
path: /opt/znuny/var/httpd/htdocs/SeleniumScreenshots/**/*
if-no-files-found: ignore
Selenium-Customer:
name: Selenium:Customer
runs-on: ubuntu-latest
container: debian:10-slim
needs: UnitTest-MySQL
env:
DB: mysql
MYSQL_USER: "znuny"
MYSQL_ROOT_PASSWORD: "secret"
MYSQL_PASSWORD: "secret"
MYSQL_DATABASE: "znuny"
SELENIUM_SCREENSHOTS: "true"
services:
mariadb:
image: mariadb:10
env:
MYSQL_USER: "znuny"
MYSQL_ROOT_PASSWORD: "secret"
MYSQL_PASSWORD: "secret"
MYSQL_DATABASE: "znuny"
chrome:
image: selenium/standalone-chrome:3.141.59-oxygen
options: --shm-size="2g"
volumes:
- ${{ github.workspace }}:/opt/znuny
steps:
- name: Check out repository code
uses: actions/checkout@v3
env:
fetch-depth: "1"
- name: Install dependencies
run: .github/workflows/ci/dependencies.sh
- name: Setup Znuny
run: .github/workflows/ci/setup.sh
- name: Run UnitTests
run: |
su -c "bin/znuny.CheckSum.pl -a create" - znuny
su -c "bin/znuny.Console.pl Dev::UnitTest::Run --directory Selenium/Customer" - znuny
- name: Archive screenshots from selenium
if: failure()
uses: actions/upload-artifact@v3
with:
name: Download all selenium screenshots
retention-days: 1
path: /opt/znuny/var/httpd/htdocs/SeleniumScreenshots/**/*
if-no-files-found: ignore
Selenium-JavaScript:
name: Selenium:JavaScript
runs-on: ubuntu-latest
container: debian:10-slim
needs: UnitTest-MySQL
env:
DB: mysql
MYSQL_USER: "znuny"
MYSQL_ROOT_PASSWORD: "secret"
MYSQL_PASSWORD: "secret"
MYSQL_DATABASE: "znuny"
SELENIUM_SCREENSHOTS: "true"
services:
mariadb:
image: mariadb:10
env:
MYSQL_USER: "znuny"
MYSQL_ROOT_PASSWORD: "secret"
MYSQL_PASSWORD: "secret"
MYSQL_DATABASE: "znuny"
chrome:
image: selenium/standalone-chrome:3.141.59-oxygen
options: --shm-size="2g"
volumes:
- ${{ github.workspace }}:/opt/znuny
steps:
- name: Check out repository code
uses: actions/checkout@v3
env:
fetch-depth: "1"
- name: Install dependencies
run: .github/workflows/ci/dependencies.sh
- name: Setup Znuny
run: .github/workflows/ci/setup.sh
- name: Run UnitTests
run: |
su -c "bin/znuny.CheckSum.pl -a create" - znuny
su -c "bin/znuny.Console.pl Dev::UnitTest::Run --directory Selenium/JavaScript" - znuny
- name: Archive screenshots from selenium
if: failure()
uses: actions/upload-artifact@v3
with:
name: Download all selenium screenshots
retention-days: 1
path: /opt/znuny/var/httpd/htdocs/SeleniumScreenshots/**/*
if-no-files-found: ignore
Selenium-Output:
name: Selenium:Output
runs-on: ubuntu-latest
container: debian:10-slim
needs: UnitTest-MySQL
env:
DB: mysql
MYSQL_USER: "znuny"
MYSQL_ROOT_PASSWORD: "secret"
MYSQL_PASSWORD: "secret"
MYSQL_DATABASE: "znuny"
SELENIUM_SCREENSHOTS: "true"
services:
mariadb:
image: mariadb:10
env:
MYSQL_USER: "znuny"
MYSQL_ROOT_PASSWORD: "secret"
MYSQL_PASSWORD: "secret"
MYSQL_DATABASE: "znuny"
chrome:
image: selenium/standalone-chrome:3.141.59-oxygen
options: --shm-size="2g"
volumes:
- ${{ github.workspace }}:/opt/znuny
steps:
- name: Check out repository code
uses: actions/checkout@v3
env:
fetch-depth: "1"
- name: Install dependencies
run: .github/workflows/ci/dependencies.sh
- name: Setup Znuny
run: .github/workflows/ci/setup.sh
- name: Run UnitTests
run: |
su -c "bin/znuny.CheckSum.pl -a create" - znuny
su -c "bin/znuny.Console.pl Dev::UnitTest::Run --directory Selenium/Output" - znuny
- name: Archive screenshots from selenium
if: failure()
uses: actions/upload-artifact@v3
with:
name: Download all selenium screenshots
retention-days: 1
path: /opt/znuny/var/httpd/htdocs/SeleniumScreenshots/**/*
if-no-files-found: ignore
Selenium-SysConfig:
name: Selenium:SysConfig
runs-on: ubuntu-latest
container: debian:10-slim
needs: UnitTest-MySQL
env:
DB: mysql
MYSQL_USER: "znuny"
MYSQL_ROOT_PASSWORD: "secret"
MYSQL_PASSWORD: "secret"
MYSQL_DATABASE: "znuny"
SELENIUM_SCREENSHOTS: "true"
services:
mariadb:
image: mariadb:10
env:
MYSQL_USER: "znuny"
MYSQL_ROOT_PASSWORD: "secret"
MYSQL_PASSWORD: "secret"
MYSQL_DATABASE: "znuny"
chrome:
image: selenium/standalone-chrome:3.141.59-oxygen
options: --shm-size="2g"
volumes:
- ${{ github.workspace }}:/opt/znuny
steps:
- name: Check out repository code
uses: actions/checkout@v3
env:
fetch-depth: "1"
- name: Install dependencies
run: .github/workflows/ci/dependencies.sh
- name: Setup Znuny
run: .github/workflows/ci/setup.sh
- name: Run UnitTests
run: |
su -c "bin/znuny.CheckSum.pl -a create" - znuny
su -c "bin/znuny.Console.pl Dev::UnitTest::Run --directory Selenium/SysConfig" - znuny
- name: Archive screenshots from selenium
if: failure()
uses: actions/upload-artifact@v3
with:
name: Download all selenium screenshots
retention-days: 1
path: |
/opt/znuny/var/httpd/htdocs/SeleniumScreenshots/**/*
if-no-files-found: ignore