Update README.md #15
This file contains 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: Docker Compose Test | |
on: | |
push: | |
branches: | |
- main | |
- '*.x' | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
include: | |
- php: '8.0' | |
laravel: 9 | |
- php: '8.1' | |
laravel: 10 | |
- php: '8.2' | |
laravel: 11 | |
- php: '8.3' | |
laravel: 11 | |
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
path: 'dentro-nge' | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: dom, curl, libxml, mbstring, zip, fileinfo | |
ini-values: error_reporting=E_ALL | |
tools: composer:v2 | |
coverage: none | |
- name: Create a new laravel application | |
run: composer create-project laravel/laravel app "${{ matrix.laravel }}.x" --remove-vcs --no-interaction --prefer-dist | |
- name: Link Nge Repository | |
run: | | |
composer config minimum-stability dev | |
composer config repositories.nge '{"type": "path", "url": "../dentro-nge", "options": { "symlink": false }}' | |
composer require dentro/nge:* --dev -W | |
working-directory: app | |
- name: Install Nge into App | |
run: | | |
php artisan nge:install --php=${{ matrix.php }} --no-interaction | |
working-directory: app | |
- name: Start Nge Container | |
run: vendor/bin/nge up -d --wait | |
working-directory: app | |
- name: Run Migrations | |
run: vendor/bin/nge once artisan migrate --no-interaction | |
working-directory: app | |
- name: Run Tests in Nge Container | |
run: vendor/bin/nge test | |
working-directory: app | |
- name: Stop Nge Container | |
run: vendor/bin/nge down | |
working-directory: app |