dockerize #146
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test install | |
| on: [push] | |
| jobs: | |
| install-project: | |
| name: Symfony (PHP ${{ matrix.php-versions }}) | |
| runs-on: ubuntu-20.04 | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| php-versions: ['8.2'] | |
| steps: | |
| # —— Setup Github actions ————————————————————————————————————————————— | |
| # https://github.com/actions/checkout (official) | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| # https://github.com/shivammathur/setup-php (community) | |
| - name: Setup PHP, extensions and composer with shivammathur/setup-php | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-versions }} | |
| extensions: mbstring, xml, ctype, iconv, intl, pdo, pdo_mysql, dom, filter, gd, iconv, json, mbstring, pdo | |
| env: | |
| update: true | |
| - name: Check PHP Version | |
| run: php -v | |
| # —— Composer️ ————————————————————————————————————————————————————————— | |
| - name: Validate composer.json and composer.lock | |
| run: composer validate | |
| - name: Get composer cache directory | |
| id: composer-cache | |
| run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
| - name: Cache composer dependencies | |
| uses: actions/cache@v1 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: ${{ runner.os }}-composer- | |
| - name: Install Composer dependencies | |
| run: composer install | |
| # —— Symfony —————————————————————————————————————————————————————————— | |
| - name: Check the Symfony console | |
| run: | | |
| bin/console about | |
| # —— Doctrine —————————————————————————————————————————————————————————— | |
| - name: Check doctrine requirments | |
| run: | | |
| echo 'DATABASE_URL="sqlite:///%kernel.project_dir%/var/database.sqlite"' > .env.local | |
| bin/console doctrine:database:create | |
| bin/console doctrine:schema:create | |
| bin/console doctrine:fixtures:load --no-interaction | |
| php bin/console d:s:v --skip-sync | |
| ## —— Yarn ———————————————————————————————————————————————————————————— | |
| - name: Yarn install / build | |
| uses: actions/setup-node@v2 | |
| with: | |
| node-version: '20' | |
| - run: | | |
| yarn install | |
| yarn encore production |