Skip to content

Commit

Permalink
Merge pull request #56 from Ujusophy/dev
Browse files Browse the repository at this point in the history
Test.yml Update for the PR
  • Loading branch information
Ruthiejayjay authored Jul 20, 2024
2 parents 09172b2 + 0fbbf1e commit 96b3c7d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,13 @@ jobs:
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
run: php artisan migrate

- name: Clear all cache
run: php artisan optimize

- name: Clear configuration cache
run: php artisan config:clear
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ jobs:
- 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

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ jobs:
echo "DB_PASSWORD=${{ secrets.DB_PASSWORD }}" >> .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
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
name: Code Quality

on:
pull_request:
pull_request_target:
branches:
- dev

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Set up PHP
uses: shivammathur/setup-php@v2
Expand All @@ -22,6 +24,7 @@ jobs:
- name: Run PHP Linting
run: |
find . -type f -name "*.php" | xargs -n1 php -l
- name: Cache Composer dependencies
uses: actions/cache@v3
with:
Expand All @@ -30,7 +33,7 @@ jobs:
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

Expand All @@ -44,10 +47,14 @@ jobs:
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

Expand Down

0 comments on commit 96b3c7d

Please sign in to comment.