fix(ci): run optimize:clear after migrations to avoid no such table: cache
API CI/CD / Validate (composer + pint) (push) Successful in 2m7s
API CI/CD / Test (PHPUnit) (push) Failing after 55s
API CI/CD / Build frontend assets (push) Successful in 54s
API CI/CD / Security audit (push) Successful in 33s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped

optimize:clear runs cache:clear which needs the cache table to exist.
Since migrate:fresh creates tables, reorder: migrate first, then clear caches.
This commit is contained in:
root
2026-06-25 17:45:43 -04:00
parent 181ac9e94e
commit d16b3bdc71
+3 -1
View File
@@ -158,11 +158,13 @@ jobs:
touch database/database.sqlite
php artisan key:generate --force
php artisan jwt:secret --force || true
php artisan optimize:clear
- name: Run database migrations
run: php artisan migrate:fresh --force
- name: Clear caches
run: php artisan optimize:clear
- name: Run Unit tests
continue-on-error: true
run: php artisan test --testsuite=Unit --log-junit reports/phpunit-unit.xml || echo "Unit tests have failures (non-blocking)"