Skip to content

Commit

Permalink
Merge pull request #53 from Hi-Folks/develop
Browse files Browse the repository at this point in the history
v0.2.4
  • Loading branch information
roberto-butti authored Apr 5, 2021
2 parents 446340f + dececb8 commit 06fa4c8
Show file tree
Hide file tree
Showing 22 changed files with 565 additions and 52 deletions.
1 change: 0 additions & 1 deletion .github/workflows/laravel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
branches:
- main
- develop
- features/**

jobs:
laravel-tests:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/psr12-phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ jobs:
- name: Execute Code Static Analysis (PHP Stan + Larastan)
run: |
composer require --dev nunomaduro/larastan
vendor/bin/phpstan analyse app -c ./vendor/nunomaduro/larastan/extension.neon --level=4 --no-progress
Expand Down
120 changes: 120 additions & 0 deletions .github/workflows/test-mysql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# GithHub Actions Workflow generated with Ghygen
# Original configuration: http://gh-actions-yaml-generator.test?code=8fc497996543799704fb7f0b861d766f
name: Test Mysql
on:
push:
branches:
- main
- develop
- features/**

jobs:
laravel-tests:
runs-on: ubuntu-latest
# Service container Mysql mysql
services:
# Label used to access the service container
mysql:
# Docker Hub image (also with version)
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: db_test_laravel
## map the "external" 33306 port with the "internal" 3306
ports:
- 33306:3306
# Set health checks to wait until mysql database has started (it takes some seconds to start)
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: [ '7.4' ]
dependency-stability: [ prefer-stable ]

name: P${{ matrix.php-versions }} - L${{ matrix.laravel }} - ${{ matrix.dependency-stability }} - ${{ matrix.operating-system}}

steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Cache node_modules directory
uses: actions/cache@v2
id: node_modules-cache
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/package-lock.json') }}
- name: Install NPM packages
if: steps.node_modules-cache.outputs.cache-hit != 'true'
run: npm ci
- name: Build frontend
run: npm run development
- name: Install PHP versions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- name: Get Composer Cache Directory 2
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v2
id: actions-cache
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Cache PHP dependencies
uses: actions/cache@v2
id: vendor-cache
with:
path: vendor
key: ${{ runner.OS }}-build-${{ hashFiles('**/composer.lock') }}
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Install Dependencies
if: steps.vendor-cache.outputs.cache-hit != 'true'
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: Generate key
run: php artisan key:generate
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Run Migrations
# Set environment
env:
DB_CONNECTION: mysql
DB_DATABASE: db_test_laravel
DB_PORT: 33306
DB_USER: root

run: php artisan migrate

- name: Show Laravel versions
run: php artisan --version
- name: Show dir
run: pwd
- name: PHP Version
run: php --version

- name: Execute tests (Unit and Feature tests) via PHPUnit
# Set environment
env:
DB_CONNECTION: mysql
DB_DATABASE: db_test_laravel
DB_PORT: 33306
DB_USER: root

run: vendor/bin/phpunit --testdox






123 changes: 123 additions & 0 deletions .github/workflows/test-postgresql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# GithHub Actions Workflow generated with Ghygen
# Original configuration: http://gh-actions-yaml-generator.test?code=98e5e699690e3ac2ae0ffe404d0ed3e9
name: Test Postgresql
on:
push:
branches:
- main
- develop
- features/**

jobs:
laravel-tests:
runs-on: ubuntu-latest
# Service container Postgresql postgresql
services:
# Label used to access the service container
postgres:
# Docker Hub image (also with version)
image: postgres:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: db_test_laravel
## map the "external" 55432 port with the "internal" 5432
ports:
- 55432:5432
# Set health checks to wait until postgresql database has started (it takes some seconds to start)
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: [ '8.0' ]
dependency-stability: [ prefer-stable ]

name: P${{ matrix.php-versions }} - L${{ matrix.laravel }} - ${{ matrix.dependency-stability }} - ${{ matrix.operating-system}}

steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Cache node_modules directory
uses: actions/cache@v2
id: node_modules-cache
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/package-lock.json') }}
- name: Install NPM packages
if: steps.node_modules-cache.outputs.cache-hit != 'true'
run: npm ci
- name: Build frontend
run: npm run development
- name: Install PHP versions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- name: Get Composer Cache Directory 2
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v2
id: actions-cache
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Cache PHP dependencies
uses: actions/cache@v2
id: vendor-cache
with:
path: vendor
key: ${{ runner.OS }}-build-${{ hashFiles('**/composer.lock') }}
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Install Dependencies
if: steps.vendor-cache.outputs.cache-hit != 'true'
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: Generate key
run: php artisan key:generate
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Run Migrations
# Set environment
env:
DB_CONNECTION: pgsql
DB_DATABASE: db_test_laravel
DB_PORT: 55432
DB_USERNAME: postgres
DB_PASSWORD: postgres

run: php artisan migrate

- name: Show Laravel versions
run: php artisan --version
- name: Show dir
run: pwd
- name: PHP Version
run: php --version

- name: Execute tests (Unit and Feature tests) via PHPUnit
# Set environment
env:
DB_CONNECTION: pgsql
DB_DATABASE: db_test_laravel
DB_PORT: 55432
DB_USERNAME: postgres
DB_PASSWORD: postgres

run: vendor/bin/phpunit --testdox






28 changes: 26 additions & 2 deletions .github/workflows/test-sqlite.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# GithHub Actions Workflow generated with Ghygen
# Original configuration: http://gh-actions-yaml-generator.test?code=f6057d1792446de0d97898542edb1b7b
# Original configuration: http://gh-actions-yaml-generator.test?code=88087e9e46cb297901790a7eb7aa424c
name: Test Sqlite
on:
push:
Expand All @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: [ '8.0' ]
php-versions: [ '7.4' ]
dependency-stability: [ prefer-stable ]

name: P${{ matrix.php-versions }} - L${{ matrix.laravel }} - ${{ matrix.dependency-stability }} - ${{ matrix.operating-system}}
Expand All @@ -26,14 +26,38 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Cache node_modules directory
uses: actions/cache@v2
id: node_modules-cache
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/package-lock.json') }}
- name: Install NPM packages
if: steps.node_modules-cache.outputs.cache-hit != 'true'
run: npm ci
- name: Build frontend
run: npm run development
- name: Install PHP versions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- name: Get Composer Cache Directory 2
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v2
id: actions-cache
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Cache PHP dependencies
uses: actions/cache@v2
id: vendor-cache
with:
path: vendor
key: ${{ runner.OS }}-build-${{ hashFiles('**/composer.lock') }}
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Install Dependencies
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
branches:
- main
- develop
- features/**

jobs:
laravel-tests:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## 0.2.4 - WIP
### Add
- Add Postgresql database

### Change
- Fix Dashboard when some old data is loaded (isMysqlService vs dataType)
Expand Down
Loading

0 comments on commit 06fa4c8

Please sign in to comment.