Skip to content

Commit

Permalink
Release 4.4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharette authored Mar 6, 2021
2 parents 9a0c8e2 + 977d0d7 commit cf651f3
Show file tree
Hide file tree
Showing 13 changed files with 425 additions and 141 deletions.
345 changes: 345 additions & 0 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,345 @@
name: Build

on:
push:
branches: ['*']
pull_request:
branches: ['*']
schedule:
- cron: "0 0 * * 5"

jobs:
PHPUnit-MySQL:

strategy:
fail-fast: false
matrix:
php_versions: ['7.1', '7.2', '7.3', '7.4']

runs-on: ubuntu-latest
name: PHPUnit - PHP ${{ matrix.php_versions }} - MySQL

env:
TEST_DB: default
UF_MODE: debug
DB_DRIVER: mysql
DB_HOST: 127.0.0.1
DB_USER: userfrosting
DB_PASSWORD: password
DB_NAME: userfrosting
DB_PORT: 3306

steps:
- uses: actions/checkout@v2

- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_versions }}
extensions: mbstring, dom, fileinfo, gd, memcached, redis, pdo_sqlite
coverage: xdebug
tools: pecl, composer:v1

- uses: actions/setup-node@v2
with:
node-version: 10

- name: Setup Redis-server
uses: supercharge/redis-github-action@1.1.0
with:
redis-version: 6

- name: Setup Memcached
uses: niden/actions-memcached@v7

- name: Shutdown Ubuntu MySQL (SUDO)
run: sudo service mysql stop # Shutdown the Default MySQL, "sudo" is necessary, please not remove it

- name: Set up MySQL (PHP <= 7.3 -> MySQL 5)
if: ${{ matrix.php_versions != 7.4 }}
uses: mirromutth/mysql-action@v1.1
with:
mysql version: '5'
mysql database: 'userfrosting'
mysql user: 'userfrosting'
mysql password: 'password'

- name: Set up MySQL (PHP >= 7.4 -> MySQL 8)
if: ${{ matrix.php_versions == 7.4 }}
uses: mirromutth/mysql-action@v1.1
with:
mysql version: '8'
mysql database: 'userfrosting'
mysql user: 'userfrosting'
mysql password: 'password'

- name: Wait for MySQL
run: |
while ! mysqladmin ping --host=127.0.0.1 --password=password --silent; do
sleep 1
done
- name: Copy .env
run: php -r "copy('app/sprinkles.example.json', 'app/sprinkles.json');"

- name: Install Dependencies
run: composer install --prefer-dist --no-progress --no-suggest

- name: Bakery Debug
run: php bakery debug

- name: Migrate DB
run: php bakery migrate

- name: Build Assets
run: php bakery build-assets

- name: Execute tests
run: app/vendor/bin/phpunit --coverage-clover=coverage.xml

- name: Upload coverage to Codecov
if: github.event_name != 'schedule'
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
fail_ci_if_error: true

PHPUnit-SQLite:

strategy:
fail-fast: false
matrix:
php_versions: ['7.1', '7.2', '7.3', '7.4']

runs-on: ubuntu-latest
name: PHPUnit - PHP ${{ matrix.php_versions }} - SQLite

env:
TEST_DB: default
UF_MODE: debug
DB_DRIVER: sqlite
DB_NAME: database/database.sqlite

steps:
- uses: actions/checkout@v2

- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_versions }}
extensions: mbstring, dom, fileinfo, gd, memcached, redis, pdo_sqlite
coverage: xdebug
tools: pecl, composer:v1

- uses: actions/setup-node@v2
with:
node-version: 10

- name: Setup Redis-server
uses: supercharge/redis-github-action@1.1.0
with:
redis-version: 6

- name: Setup Memcached
uses: niden/actions-memcached@v7

- name: Copy .env
run: php -r "copy('app/sprinkles.example.json', 'app/sprinkles.json');"

- name: Install Dependencies
run: composer install --prefer-dist --no-progress --no-suggest

- name: Create SQLite Database
run: |
mkdir -p database
touch database/database.sqlite
- name: Bakery Debug
run: php bakery debug

- name: Migrate DB
run: php bakery migrate

- name: Build Assets
run: php bakery build-assets

- name: Execute tests
run: app/vendor/bin/phpunit --coverage-clover=coverage.xml

- name: Upload coverage to Codecov
if: github.event_name != 'schedule'
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
fail_ci_if_error: true

PHPUnit-Postgre:

strategy:
fail-fast: false
matrix:
php_versions: ['7.1', '7.2', '7.3', '7.4']

runs-on: ubuntu-latest
name: PHPUnit - PHP ${{ matrix.php_versions }} - PostgreSQL

env:
TEST_DB: default
UF_MODE: debug
DB_DRIVER: pgsql
DB_HOST: 127.0.0.1
DB_USER: userfrosting
DB_PASSWORD: password
DB_NAME: userfrosting
DB_PORT: 5432

steps:
- uses: actions/checkout@v2

- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_versions }}
extensions: mbstring, dom, fileinfo, gd, memcached, redis, pdo_sqlite, pdo_pgsql
coverage: xdebug
tools: pecl, composer:v1

- name: Setup PostgreSQL
uses: harmon758/postgresql-action@v1
with:
postgresql db: 'userfrosting'
postgresql user: 'userfrosting'
postgresql password: 'password'

- uses: actions/setup-node@v2
with:
node-version: 10

- name: Setup Redis-server
uses: supercharge/redis-github-action@1.1.0
with:
redis-version: 6

- name: Setup Memcached
uses: niden/actions-memcached@v7

- name: Copy .env
run: php -r "copy('app/sprinkles.example.json', 'app/sprinkles.json');"

- name: Install Dependencies
run: composer install --prefer-dist --no-progress --no-suggest

- name: Bakery Debug
run: php bakery debug

- name: Migrate DB
run: php bakery migrate

- name: Build Assets
run: php bakery build-assets

- name: Execute tests
run: app/vendor/bin/phpunit --coverage-clover=coverage.xml

- name: Upload coverage to Codecov
if: github.event_name != 'schedule'
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
fail_ci_if_error: true

PHPUnit-Windows:

strategy:
fail-fast: false
matrix:
php_versions: ['7.1', '7.2', '7.3', '7.4']

runs-on: windows-latest
name: PHPUnit - PHP ${{ matrix.php_versions }} - Windows

env:
TEST_DB: default
UF_MODE: debug
DB_DRIVER: sqlite
DB_NAME: database/database.sqlite

steps:
- uses: actions/checkout@v2

- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_versions }}
extensions: mbstring, dom, fileinfo, gd, pdo, sqlite, pdo_sqlite
coverage: xdebug
tools: pecl, composer:v1

- uses: actions/setup-node@v2
with:
node-version: 10

- name: Copy .env
run: php -r "copy('app/sprinkles.example.json', 'app/sprinkles.json');"

- name: Install Dependencies
run: composer install --prefer-dist --no-progress --no-suggest

- name: Create SQLite Database
run: |
mkdir -p database
touch database/database.sqlite
- name: Bakery Debug
run: php bakery debug

- name: Migrate DB
run: php bakery migrate

- name: Build Assets
run: php bakery build-assets

- name: Execute tests
run: app/vendor/bin/phpunit --coverage-clover=coverage.xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
fail_ci_if_error: true

Asset-Build:

strategy:
fail-fast: false
matrix:
php_versions: ['7.4']
node_versions: ['10', '12', '14']
os: [ubuntu-latest, windows-latest]

runs-on: ${{ matrix.os }}
name: Assets Build - PHP ${{ matrix.php_versions }} - Node ${{ matrix.node_versions }} - ${{ matrix.os }}

steps:
- uses: actions/checkout@v2

- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_versions }}
extensions: mbstring, dom, fileinfo, gd
coverage: xdebug
tools: pecl, composer:v1

- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node_versions }}

- name: Copy .env
run: php -r "copy('app/sprinkles.example.json', 'app/sprinkles.json');"

- name: Install Dependencies
run: composer install --prefer-dist --no-progress --no-suggest

- name: Execute build
run: php bakery build-assets
Loading

0 comments on commit cf651f3

Please sign in to comment.