Merge pull request #521 from Thoth2023/feature/snowballing-module #872
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: Laravel | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| pull_request: | |
| branches: | |
| - main | |
| - develop | |
| jobs: | |
| laravel-tests: | |
| runs-on: ubuntu-latest | |
| services: | |
| db: | |
| image: mysql:latest | |
| env: | |
| MYSQL_DATABASE: thoth | |
| MYSQL_ROOT_PASSWORD: root | |
| ports: | |
| - 3306:3306 | |
| options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
| steps: | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.1' | |
| - uses: actions/checkout@v3 | |
| - name: Enable pdo extension | |
| run: sudo apt-get install -y php8.1-pdo | |
| - name: Copy .env | |
| run: php -r "file_exists('.env') || copy('.env.example', '.env');" | |
| - name: Install Dependencies | |
| run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
| - name: Update Dependencies | |
| run: composer update | |
| - name: Generate key | |
| run: php artisan key:generate | |
| - name: Migrate | |
| env: | |
| DB_CONNECTION: mysql | |
| DB_HOST: 127.0.0.1 | |
| DB_PORT: 3306 | |
| DB_DATABASE: thoth | |
| DB_USERNAME: root | |
| DB_PASSWORD: root | |
| run: php artisan migrate --seed | |
| - name: Directory Permissions | |
| run: chmod -R 777 storage bootstrap/cache | |
| - name: Execute tests (Unit and Feature tests) via PHPUnit | |
| env: | |
| DB_CONNECTION: mysql | |
| DB_HOST: 127.0.0.1 | |
| DB_PORT: 3306 | |
| DB_DATABASE: thoth | |
| DB_USERNAME: root | |
| DB_PASSWORD: root | |
| run: vendor/bin/phpunit tests --testdox |