Skip to content

Add FleetJourney component #105

Add FleetJourney component

Add FleetJourney component #105

Workflow file for this run

name: Build and check
on:
push:
pull_request: ~
release:
types: [created]
workflow_dispatch: ~
jobs:
tests:
runs-on: ubuntu-latest
name: "TheGame - Symfony: ${{ matrix.symfony }}, PHP: ${{ matrix.php }}, MySQL: ${{ matrix.mysql }}"
strategy:
fail-fast: false
matrix:
php: ["8.1"]
symfony: ["^6.3"]
mysql: ["8.0"]
env:
APP_ENV: test
DATABASE_URL: "mysql://root:[email protected]/the_game_test?serverVersion=${{ matrix.mysql }}"
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
extensions: intl
tools: symfony
coverage: none
- name: Shutdown default MySQL
run: sudo service mysql stop
- name: Setup MySQL
uses: mirromutth/[email protected]
with:
mysql version: "${{ matrix.mysql }}"
mysql root password: "root"
- name: Output PHP version for Symfony CLI
run: php -v | head -n 1 | awk '{ print $2 }' > .php-version
- name: Install certificates
run: symfony server:ca:install
- name: Get Composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache Composer
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json **/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php }}-composer-
- name: Restrict Symfony version
if: matrix.symfony != ''
run: |
composer config extra.symfony.require "${{ matrix.symfony }}"
- name: Install PHP dependencies
run: composer install --no-interaction
- name: Prepare test application database
run: |
bin/console doctrine:database:create -vvv
bin/console doctrine:schema:create -vvv
- name: Prepare test application cache
run: bin/console cache:warmup -vvv
- name: Validate composer.json
run: composer validate --ansi --strict --no-check-lock
# Commented out, as we currently have no database mappings
# - name: Validate database schema
# run: bin/console doctrine:schema:validate
- name: Run ECS
run: vendor/bin/ecs check
- name: Run PHPStan
run: vendor/bin/phpstan analyze src
- name: Run PHPSpec
run: vendor/bin/phpspec run --ansi -f progress --no-interaction
- name: Run PHPUnit
run: vendor/bin/phpunit --colors=always