Skip to content

Firefly III: a personal finances manager

Try to speed up some steps.

James Colee84bff6c515f
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 66a982e56c..f60218a4c4 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -7,6 +7,10 @@ on:
description: 'Release "v1.2.3" or "develop" or "branch-abc"'
required: true
default: 'develop'
+ quick:
+ description: 'Skip most checks. true or false'
+ required: true
+ default: 'false'
phpversion:
description: 'PHP version'
required: true
@@ -72,26 +76,29 @@ jobs:
extensions: mbstring, intl, zip, bcmath
- name: Lint PHP
run: |
- php_lint_file()
- {
- local php_file="$1"
- php -l "$php_file" &> /dev/null
- if [ "$?" -ne 0 ]
- then
- echo -e "[FAIL] $php_file"
- return 1
- fi
- }
-
- export -f php_lint_file
-
- find . -path ./vendor -prune -o -name '*.php' | parallel -j 4 php_lint_file {}
-
- if [ "$?" -ne 0 ]
- then
- exit 1
+ if [[ "$quick" == "false" ]]; then
+ php_lint_file()
+ {
+ local php_file="$1"
+ php -l "$php_file" &> /dev/null
+ if [ "$?" -ne 0 ]
+ then
+ echo -e "[FAIL] $php_file"
+ return 1
+ fi
+ }
+
+ export -f php_lint_file
+
+ find . -path ./vendor -prune -o -name '*.php' | parallel -j 4 php_lint_file {}
+
+ if [ "$?" -ne 0 ]
+ then
+ exit 1
+ fi
fi
-
+ env:
+ quick: ${{ 'false' || inputs.quick }}
- name: Code cleanup
id: code-cleanup
uses: JC5/firefly-iii-dev@main
@@ -108,27 +115,34 @@ jobs:
rm -rf vendor composer.lock
composer update --no-scripts -q
- # format code.
- echo "Will now run Mago Format"
- ./vendor/bin/mago format
- sudo chown -R runner:docker resources/lang
- echo "Will now run PHPCS"
- .ci/phpcs.sh
-
- # lint and check
- echo "Will now run Mago Lint"
- ./vendor/bin/mago lint
- echo "Will now run PHPstan"
- .ci/phpstan.sh
- rm .env
+ if [[ "$quick" == "false" ]]; then
+ # format code.
+ echo "Will now run Mago Format"
+ ./vendor/bin/mago format
+ sudo chown -R runner:docker resources/lang
+ echo "Will now run PHPCS"
+ .ci/phpcs.sh
+
+ # lint and check
+ echo "Will now run Mago Lint"
+ ./vendor/bin/mago lint
+ echo "Will now run PHPstan"
+ .ci/phpstan.sh
+ rm .env
+ fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ quick: ${{ 'false' || inputs.quick }}
- name: Lint Blade templates
run: |
- echo "Will now run Blade linter"
- cp .env.example .env
- php artisan blade:lint
- rm .env
+ if [[ "$quick" == "false" ]]; then
+ echo "Will now run Blade linter"
+ cp .env.example .env
+ php artisan blade:lint
+ rm .env
+ fi
+ env:
+ quick: ${{ 'false' || inputs.quick }}
- name: Crowdin action
uses: crowdin/github-action@v2
with: