Implement endpoint to update notification settings #40 #175
Workflow file for this run
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: Code Quality | |
on: | |
pull_request_target: | |
branches: | |
- dev | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Set up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.2' | |
extensions: pgsql, pdo_pgsql, zip, bcmath | |
- name: Run PHP Linting | |
run: | | |
find . -type f -name "*.php" | xargs -n1 php -l | |
- name: Get Composer cache directory | |
id: composer-cache | |
run: echo "::set-output name=dir::$(composer config cache-dir)" | |
- name: Cache Composer dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-composer- | |
- name: Install PHP dependencies | |
run: composer install --no-interaction --prefer-dist --optimize-autoloader | |
- name: Set environment variables for CI | |
run: | | |
cp .env.example .env | |
echo "APP_KEY=${{ secrets.APP_KEY }}" >> .env | |
echo "DB_CONNECTION=pgsql" >> .env | |
echo "DB_HOST=${{ secrets.DB_HOST }}" >> .env | |
echo "DB_PORT=${{ secrets.DB_PORT }}" >> .env | |
echo "DB_DATABASE=${{ secrets.DB_DATABASE }}" >> .env | |
echo "DB_USERNAME=${{ secrets.DB_USERNAME }}" >> .env | |
echo "DB_PASSWORD=${{ secrets.DB_PASSWORD }}" >> .env | |
echo "DATABASE_URL=postgres://${{ secrets.DB_USERNAME }}:${{ secrets.DB_PASSWORD }}@${{ secrets.DB_HOST }}:${{ secrets.DB_PORT }}/${{ secrets.DB_DATABASE }}?sslmode=disable" >> .env | |
- name: Run database migrations | |
run: php artisan migrate --force | |
- name: Clear all cache | |
run: php artisan optimize | |
- name: Clear configuration cache | |
run: php artisan config:clear | |
- name: Run Laravel tests | |
run: | | |
php artisan jwt:secret | |
php artisan test |