Update HTML cleaning function #82
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: Laravel CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
laravel: | |
name: Laravel Testsuite | |
runs-on: ubuntu-20.04 # has mysql 8 installed by default | |
steps: | |
- name: Set Up Mysql 8 | |
run: | | |
echo -e "Enable LOAD DATA LOCAL INFILE in my.cnf\n" | |
echo -e "SETTING secure-file-priv TO EMPTY STRING\n" | |
echo -e "[mysqld]\nsecure-file-priv=''" | sudo tee -a /etc/mysql/my.cnf | |
echo -e "SETTING local_infile TO ON\n" | |
echo -e "[mysqld]\nlocal_infile='ON'" | sudo tee -a /etc/mysql/my.cnf | |
echo -e "Start MYSQL service, it is off by default\n" | |
sudo systemctl enable mysql.service | |
sudo systemctl start mysql.service | |
echo -e "Creating Laravel Database\n" | |
mysql --host 127.0.0.1 -uroot -proot -e 'CREATE DATABASE IF NOT EXISTS laravel;' | |
echo -e "Check new settings\n" | |
mysql --host 127.0.0.1 -uroot -proot -e "SELECT @@global.secure_file_priv, @@global.local_infile" | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Get Composer Cache Directory | |
id: get-composer-cache | |
run: | | |
echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache Composer | |
uses: actions/cache@v1 | |
id: composer-cache | |
with: | |
path: ${{ steps.get-composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-composer- | |
- name: Install composer dependencies | |
run: composer install -q --no-progress --prefer-dist --no-interaction --no-suggest --optimize-autoloader --no-scripts | |
- name: Clear Config | |
run: | | |
php artisan config:clear | |
php artisan cache:clear | |
- name: Prepare the application | |
run: | | |
cp .env.ci .env | |
php artisan key:generate | |
- name: Run Migrations | |
run: php artisan migrate --force -v | |
- name: Test with phpunit | |
run: ./vendor/bin/pest |