This repository was archived by the owner on Aug 19, 2025. It is now read-only.
Add job queue database and processing #1209
This file contains hidden or 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
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| pull_request: | |
| branches: | |
| - '**' | |
| jobs: | |
| build: | |
| services: | |
| mysql: | |
| image: mysql:8.4 | |
| env: | |
| MYSQL_DATABASE: wsexport_test | |
| MYSQL_ROOT_PASSWORD: testpwd | |
| ports: | |
| - '3306:3306' | |
| options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-latest ] | |
| # Test against the lowest and highest PHP versions that we support. | |
| php: [ '8.2', '8.3' ] | |
| epubcheck: [ '5.2.1' ] | |
| env: | |
| APP_ENV: test | |
| DATABASE_URL: mysql://root:testpwd@127.0.0.1:3306/wsexport_test?serverVersion=8.4 | |
| EPUBCHECK_JAR: /home/runner/work/ws-export/ws-export/epubcheck-${{matrix.epubcheck}}/epubcheck.jar | |
| runs-on: ${{matrix.os}} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v1 | |
| - name: Set up PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{matrix.php}} | |
| extensions: pdo, mysql, pdo_mysql, sqlite3, imagick, zip | |
| coverage: none | |
| - name: Install Calibre, epubcheck, and fonts | |
| run: | | |
| sudo apt-get update -q | |
| sudo apt-get install fonts-freefont-ttf fonts-linuxlibertine fonts-dejavu-core fonts-gubbi fonts-opendyslexic libegl1 libopengl0 libxcb-cursor0 -y | |
| sudo mkdir /usr/share/desktop-directories/ | |
| sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin | |
| wget https://github.com/w3c/epubcheck/releases/download/v${{matrix.epubcheck}}/epubcheck-${{matrix.epubcheck}}.zip | |
| unzip epubcheck-${{matrix.epubcheck}}.zip | |
| realpath epubcheck-${{matrix.epubcheck}} | |
| - name: Install WSExport | |
| run: | | |
| composer install | |
| ./bin/console doctrine:migrations:migrate --no-interaction | |
| npm ci | |
| - name: Test | |
| run: | | |
| composer test | |
| ./bin/phpunit --exclude-group=exclude-from-ci | |
| npm test | |
| git status | |
| git status | grep "nothing added to commit" | |
| - name: Epubcheck | |
| run: | | |
| ./bin/console app:check --namespaces=0 --count=3 --lang en | |
| ./bin/console app:check --namespaces=0 --count=3 --lang ar | |
| ./bin/console app:check --namespaces=0 --count=3 --lang bn | |
| continue-on-error: true |