v3.0.37.1 Hotfix #220
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
name: 'CI' | |
on: | |
pull_request: | |
branches: [ 'main', 'wip/*', 'v3.0.*' ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- 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 update && sudo apt install -y --fix-missing 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 mv /home/runner/work/wirhub-app/wirhub-app/.php-* /var/www/wirhub | |
sudo chown -R www-data:www-data /var/www | |
- name: Composer install | |
run: sudo -u www-data composer install --prefer-dist --no-progress --no-scripts --working-dir /var/www/wirhub | |
- name: PHP CS Fixer | |
run: /var/www/wirhub/vendor/bin/php-cs-fixer check --stop-on-violation --config=/var/www/wirhub/.php-cs-fixer.dist.php | |
- name: Prepare symfony | |
run: | | |
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@v4 | |
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/* |