2020-07-31 00:05:28 -05:00
|
|
|
name: Firefly III
|
2020-07-26 17:57:36 -05:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2020-08-01 08:06:02 -05:00
|
|
|
branches-ignore:
|
|
|
|
- '**'
|
2020-07-26 17:57:36 -05:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
prepare:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2023-02-19 01:52:46 -06:00
|
|
|
- uses: actions/checkout@v3
|
2020-07-26 17:57:36 -05:00
|
|
|
- name: Copy .env
|
2020-07-31 05:08:58 -05:00
|
|
|
run: test -f .env || cp .ci/.env.ci .env
|
2020-07-30 23:57:38 -05:00
|
|
|
- name: Prepare dependencies
|
2020-07-26 17:57:36 -05:00
|
|
|
run: |
|
|
|
|
set -euxo pipefail
|
|
|
|
export PATH=$PATH:$HOME/.composer/vendor/bin/
|
|
|
|
composer global require hirak/prestissimo --no-plugins --no-scripts
|
|
|
|
composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist --no-suggest
|
|
|
|
|
|
|
|
touch ./storage/database/database.sqlite
|
2020-07-30 23:57:38 -05:00
|
|
|
- name: Prepare Firefly III
|
2020-07-26 17:57:36 -05:00
|
|
|
run: |
|
|
|
|
chmod -R 777 storage bootstrap/cache
|
|
|
|
php artisan migrate --seed
|
|
|
|
php artisan firefly-iii:upgrade-database
|
|
|
|
- name: Upload database
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: database
|
|
|
|
path: storage/database/database.sqlite
|
|
|
|
- name: Upload cache
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: cache
|
|
|
|
path: bootstrap/cache/
|
|
|
|
- name: Upload composer cache
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: composer
|
|
|
|
path: ~/.composer
|
|
|
|
|
|
|
|
laravel-tests:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
needs:
|
|
|
|
- prepare
|
|
|
|
|
|
|
|
steps:
|
2023-02-19 01:52:46 -06:00
|
|
|
- uses: actions/checkout@v3
|
2020-07-26 17:57:36 -05:00
|
|
|
- name: Copy .env
|
2020-07-31 05:08:58 -05:00
|
|
|
run: test -f .env || cp .ci/.env.ci .env
|
2020-07-26 17:57:36 -05:00
|
|
|
- name: Download database
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
name: database
|
|
|
|
path: storage/database/database.sqlite
|
|
|
|
- name: Download cache
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
name: cache
|
|
|
|
path: bootstrap/cache/
|
|
|
|
- name: Download vendor
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
name: composer
|
|
|
|
path: ~/.composer
|
2020-07-31 01:56:12 -05:00
|
|
|
- name: Install composer
|
2020-07-26 17:57:36 -05:00
|
|
|
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist --no-suggest
|
|
|
|
|
|
|
|
- name: PHPUnit tests
|
2020-07-31 05:12:54 -05:00
|
|
|
uses: php-actions/phpunit@v1
|
2020-07-26 17:57:36 -05:00
|
|
|
with:
|
|
|
|
config: phpunit.xml
|
2020-07-31 05:12:54 -05:00
|
|
|
memory: 512M
|
2020-07-26 17:57:36 -05:00
|
|
|
|
|
|
|
coding-standards:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
needs:
|
|
|
|
- prepare
|
|
|
|
|
|
|
|
steps:
|
2023-02-19 01:52:46 -06:00
|
|
|
- uses: actions/checkout@v3
|
2020-07-26 17:57:36 -05:00
|
|
|
- name: Copy .env
|
2020-07-31 05:08:58 -05:00
|
|
|
run: test -f .env || cp .ci/.env.ci .env
|
2020-07-26 17:57:36 -05:00
|
|
|
- name: Download database
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
name: database
|
|
|
|
path: storage/database/database.sqlite
|
|
|
|
- name: Download cache
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
name: cache
|
|
|
|
path: bootstrap/cache/
|
|
|
|
- name: Download vendor
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
name: composer
|
|
|
|
path: ~/.composer
|
|
|
|
- name: install depenencies
|
|
|
|
run: |
|
|
|
|
composer global require nette/coding-standard
|
|
|
|
composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist --no-suggest
|
|
|
|
|
2020-07-31 01:48:06 -05:00
|
|
|
- name: Execute code standard
|
2020-07-31 05:08:58 -05:00
|
|
|
run: /home/runner/.composer/vendor/bin/ecs check app tests --config ./.ci/firefly-iii-standard.yml
|
2020-07-26 17:57:36 -05:00
|
|
|
|
|
|
|
phpstan:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
needs:
|
|
|
|
- prepare
|
|
|
|
|
|
|
|
steps:
|
2023-02-19 01:52:46 -06:00
|
|
|
- uses: actions/checkout@v3
|
2020-07-26 17:57:36 -05:00
|
|
|
- name: Copy .env
|
2020-07-31 05:08:58 -05:00
|
|
|
run: test -f .env || cp .ci/.env.ci .env
|
2020-07-26 17:57:36 -05:00
|
|
|
- name: Download database
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
name: database
|
|
|
|
path: storage/database/database.sqlite
|
|
|
|
- name: Download cache
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
name: cache
|
|
|
|
path: bootstrap/cache/
|
|
|
|
- name: Download vendor
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
name: composer
|
|
|
|
path: ~/.composer
|
2020-07-31 00:37:44 -05:00
|
|
|
- name: Install depenencies
|
2020-07-26 17:57:36 -05:00
|
|
|
run: |
|
|
|
|
composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist --no-suggest
|
|
|
|
|
2020-07-31 00:37:44 -05:00
|
|
|
- name: Execute PHPStan
|
2020-07-31 05:56:32 -05:00
|
|
|
run: vendor/bin/phpstan analyse -c .ci/phpstan.neon
|