Skip to content

v3.0.18

v3.0.18 #134

Workflow file for this run

name: 'CI'
on:
pull_request:
branches: [ 'main', 'wip/*' ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Add GitHub OAuth credentials
run: echo '${{ secrets.COMPOSER_AUTH_JSON }}' > $GITHUB_WORKSPACE/auth.json
- name: Install extensions
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: imagick, sqlite3
ini-values: error_log=/home/runner/.symfony5/log/php.log
- name: Install Webserver
run: |
sudo apt install -y apache2 libapache2-mod-php8.2
- name: Move project to web
run: |
sudo mkdir /var/www/wirhub
sudo mv /home/runner/work/wirhub-app/wirhub-app/* /var/www/wirhub
sudo mv /home/runner/work/wirhub-app/wirhub-app/.env* /var/www/wirhub
sudo chown -R www-data:www-data /var/www
- name: Prepare symfony
run: |
sudo -u www-data composer install --prefer-dist --no-progress --no-scripts --working-dir /var/www/wirhub
sudo -u www-data composer dump-env test --working-dir /var/www/wirhub
sudo -u www-data php /var/www/wirhub/bin/console cache:clear
sudo -u www-data php /var/www/wirhub/bin/console assets:install public/
sudo -u www-data php /var/www/wirhub/bin/console doctrine:database:create
sudo -u www-data mkdir /var/www/wirhub/var/cache/test/sessions
- name: Update folder permissions
run: |
sudo chmod -R 777 /var/www/wirhub
- name: Finish webserver
run: |
sudo rm /etc/apache2/sites-available/000-default.conf
sudo cp /var/www/wirhub/vendor/wirdesign-communication-ag/wirhub/Tests/Config/vhost_github.conf /etc/apache2/sites-available/000-default.conf
sudo a2enmod rewrite
sudo systemctl restart apache2
- name: Run tests
run: cd /var/www/wirhub && make test
- name: Archive debugging files
uses: actions/upload-artifact@v3
if: failure()
with:
name: debug
if-no-files-found: ignore
path: |
/var/www/wirhub/.env.local.php
/var/www/wirhub/vendor/wirdesign-communication-ag/wirhub/build/debug/*
/var/www/wirhub/var/cache/test/*.log
/var/www/wirhub/var/cache/wdc-styleguide.db
/var/www/wirhub/var/log/*