update min versions #135
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: PHP Composer | |
on: | |
push: | |
jobs: | |
test: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
php: | |
# - '7.2' | |
# - '7.3' | |
# - '7.4' | |
# - '8.0' | |
- '8.1' | |
- '8.2' | |
- '8.3' | |
composer: | |
- '' | |
- '--prefer-lowest' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: sqlite3, zip | |
coverage: xdebug | |
tools: composer:v2 | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: | | |
echo "::set-output name=dir::$(composer config cache-dir)" | |
working-directory: ./ | |
- name: cache dependencies | |
id: angular-dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-${{ matrix.php }}-${{ matrix.composer }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.php }}-${{ matrix.composer }}-composer- | |
- name: Validate composer.json and composer.lock | |
run: composer validate | |
working-directory: ./ | |
- name: Install dependencies | |
env: | |
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }} | |
COMPOSER_FLAGS: ${{ matrix.composer }} | |
run: composer update ${COMPOSER_FLAGS} --prefer-source | |
working-directory: ./ | |
- name: Start MySQL | |
run: | | |
sudo systemctl start mysql | |
- name: Disable MySQL strict mode | |
run: | | |
echo "SET GLOBAL sql_mode = ''" | mysql -u root -proot mysql | |
- name: Setup MySQL Database | |
run: | | |
mysql -u root -proot -e "create database mydatabase;" | |
mysql -u root -proot -e "CREATE USER 'devuser' identified WITH mysql_native_password by 'devpass';" | |
mysql -u root -proot -e "grant all privileges on mydatabase.* to 'devuser';" | |
mysql -u root -proot mydatabase < Resources/fixtures/00_clear_database.sql | |
mysql -u root -proot mydatabase < Resources/fixtures/01_users.sql | |
- name: Run Tests | |
run: composer run-script ci-test | |
working-directory: ./ | |
env: | |
SYMFONY_DEPRECATIONS_HELPER: weak | |
MYSQL_HOST: localhost |