Skip to content

Commit

Permalink
Set session.save_path ini setting in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisameling committed Feb 22, 2021
1 parent 91e90f2 commit 2b10aef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,14 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
ini-values: session.save_path=${{ github.workspace }}/tmp/php_sessions
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, mysql, pdo_mysql

- name: Set SYMFONY_ENV to test
run: echo "SYMFONY_ENV=test" >> $GITHUB_ENV

- name: Install Apache
# We need the sed command at the bottom to set the PHP session save path to a directory that's writable for PHP
run: |
sudo add-apt-repository ppa:ondrej/php -y
sudo add-apt-repository ppa:ondrej/apache2 -y
Expand All @@ -54,6 +56,7 @@ jobs:
sudo cp ./.github/workflows/mautic-apache.conf /etc/apache2/conf-available/mautic.conf
sudo a2enconf mautic
sudo service apache2 restart
sed -i 's,^;session.save_path =.*$,session.save_path = "${{ github.workspace }}/tmp/php_sessions",' php.ini
- name: Install dependencies
run: |
Expand Down

0 comments on commit 2b10aef

Please sign in to comment.