Skip to content

[PR] Feature/issue 443 add switch language fix #121

[PR] Feature/issue 443 add switch language fix

[PR] Feature/issue 443 add switch language fix #121

Workflow file for this run

name: Laravel
on:
pull_request:
branches: [ "main","master/preprod","master/dev"]
push:
branches: ["master/dev"]
jobs:
laravel-tests:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: testing
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
defaults:
run:
working-directory: src
steps:
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: '8.1'
extensions: opcache, pdo_mysql
- uses: actions/checkout@v3
- 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: Generate key
run: php artisan key:generate
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache && chmod -R 777 app/Models && chmod -R 777 database/migrations
- name: Execute tests (Unit and Feature tests) via PHPUnit
env:
DB_CONNECTION: mysql
DB_HOST: 127.0.0.1
DB_PORT: 3306
DB_DATABASE: laravel_test
DB_USERNAME: root
DB_PASSWORD: password
APP_ENV: testing
CACHE_DRIVER: array
QUEUE_CONNECTION: sync
SESSION_DRIVER: array
MAIL_MAILER: array
TELESCOPE_ENABLED: false
BCRYPT_ROUNDS: 4
run: php -dmemory_limit=1G vendor/bin/phpunit
- name: Fix code coverage paths
run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' test_results/coverage.xml
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}