Skip to content

Add default group setting #505

Add default group setting

Add default group setting #505

Workflow file for this run

name: CI
on:
push:
branches:
- main
- dev
pull_request:
branches:
- '**'
jobs:
build:
services:
db:
image: ${{ matrix.db }}
env:
MYSQL_DATABASE: twyne_test
MYSQL_ROOT_PASSWORD: testpwd
ports:
- '3306:3306'
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
matrix:
os: [ 'ubuntu-latest' ]
# All supported PHP versions (only dropping unsupported when necessary). https://www.php.net/supported-versions.php
php: [ '7.4', '8.0', '8.1', '8.2' ]
# MariaDB: Oldest and newest supported. https://mariadb.org/download
# MySQL: previous and current GA versions. https://dev.mysql.com/downloads/mysql/
db: [ 'mariadb:10.3.37', 'mariadb:10.10.2', 'mysql:5.7', 'mysql:8.0' ]
runs-on: ${{ matrix.os }}
name: PHP ${{ matrix.php }} on ${{ matrix.os }} with ${{ matrix.db }}
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{matrix.php}}
extensions: fileinfo, json, pdo, mysql, pdo_mysql, mbstring
- name: Install
env:
APP_ENV: test
# The database server version has to be specified in the format:
# ^(?:5\.5\.5-)?(mariadb-)?<major_version>.<minor_version>.<patch_version>
# This differs from what's in the matrix, so we do it manually below.
run: |
export SERVER_VERSION="8.0"
if [ "${{ matrix.db }}" = "mariadb:10.3.37" ]; then
SERVER_VERSION="mariadb-10.3.37"
elif [ "${{ matrix.db }}" = "mariadb:10.10.2" ]; then
SERVER_VERSION="mariadb-10.11.1"
elif [ "${{ matrix.db }}" = "mysql:5.7" ]; then
SERVER_VERSION="5.7"
fi
export DATABASE_URL="mysql://root:[email protected]:3306/twyne_test?serverVersion=$SERVER_VERSION"
echo DATABASE_URL is: $DATABASE_URL
if [ "$SERVER_VERSION" = "8.0" ]; then
sudo mysql --host 127.0.0.1 -uroot -ptestpwd -e "ALTER USER root IDENTIFIED WITH mysql_native_password BY 'testpwd';"
fi
echo DATABASE_URL=$DATABASE_URL > .env.test.local
sudo apt-get update -q
sudo apt-get --fix-broken install
sudo apt-get install -y exiftool shellcheck
composer install
./bin/console doctrine:migrations:migrate
npm ci
- name: Test
run: |
composer test
npm run test
shellcheck bin/deploy.sh
- name: Build and check assets
run: |
npm run build
git diff
git status | grep "nothing to commit, working tree clean"