Skip to content

Commit

Permalink
Merge pull request #71 from Hi-Folks/develop
Browse files Browse the repository at this point in the history
v0.3.3
  • Loading branch information
roberto-butti authored Apr 24, 2021
2 parents d1ece26 + 006f609 commit 6179796
Show file tree
Hide file tree
Showing 14 changed files with 3,548 additions and 1,582 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# GithHub Actions Workflow generated with Ghygen
# Original configuration: http://gh-actions-yaml-generator.test?code=320394a6c722d6fda58bc80bb96900a8
name: Test Laravel Github action
on:
push:
branches:
- main
- develop
- features/**

jobs:
laravel-tests:
runs-on: ubuntu-latest

strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: [ '8.0','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: Install PHP versions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- 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: Show dir
run: pwd
- name: PHP Version
run: php --version

# Code quality


- name: Execute Code Static Analysis (PSALM)
run: |
vendor/bin/psalm
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 0.3.3 - 2021-04-24
## Add
- Psalm as Static Code Analysis Tool
- Add composer install --no-dev before deploy

## 0.3.2 - 2021-04-22
### Add
- Postgresql template option
Expand Down
5 changes: 4 additions & 1 deletion Makefile.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,7 @@ optimize: ## Optimize application in production
laralens: ## Execute Diagnostic on the server
ssh ${SSH_ALIAS} "cd ${WEB_DIR}; php artisan laralens:diagnostic"

deploy: buildfrontend rsynca copyenvprod migrate
composerinstallnodev:
composer install --no-dev

deploy: buildfrontend composerinstallnodev rsynca copyenvprod migrate
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ __Ghygen__ allows you creating your __Yaml__ file for __GitHub Actions__, for La
- setup __Sqlite__ in memory database;
- run migrations;
- __execute tests__ via phpunit;
- static __code analysis__;
- static __code analysis__ with phpstan or psalm;
- code sniffer (via phpcs for __PSR12__ compatibility);
- __validate Yaml__ file;
- execute __Browser Test__ via Laravel Dusk.
Expand Down
2 changes: 1 addition & 1 deletion app/Traits/Form/CodeQuality.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ trait CodeQuality
public $stepInstallCodeSniffer; //true
public $stepExecuteStaticAnalysis; // false
public $stepDirStaticAnalysis; // app
public $stepToolStaticAnalysis; // phpstan|larastan
public $stepToolStaticAnalysis; // phpstan|larastan|psalmlaravel
public $stepInstallStaticAnalysis; //true
public $stepDusk; // false

Expand Down
9 changes: 7 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,17 @@
"nunomaduro/collision": "^5.0",
"nunomaduro/larastan": "^0.7.2",
"phpunit/phpunit": "^9.3.3",
"squizlabs/php_codesniffer": "^3.6"
"psalm/plugin-laravel": "^1.4",
"squizlabs/php_codesniffer": "^3.6",
"vimeo/psalm": "^4.7"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
"sort-packages": true,
"platform": {
"php": "7.4"
}
},
"extra": {
"laravel": {
Expand Down
Loading

0 comments on commit 6179796

Please sign in to comment.