feat: AI Content Quality Scoring Dashboard (#35) #208
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: CI | |
| on: | |
| push: | |
| branches: [main, dev] | |
| pull_request: | |
| branches: [main, dev] | |
| jobs: | |
| test: | |
| name: PHP ${{ matrix.php }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| php: ["8.4"] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: mbstring, xml, sqlite3, dom, curl | |
| coverage: none | |
| - name: Cache Composer dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: vendor | |
| key: composer-${{ matrix.php }}-${{ hashFiles('composer.lock') }} | |
| restore-keys: composer-${{ matrix.php }}- | |
| - name: Install Composer dependencies | |
| run: composer install --no-interaction --prefer-dist --no-progress | |
| - name: Setup Node 22 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| - name: Cache npm dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.npm | |
| key: npm-${{ hashFiles('package-lock.json') }} | |
| restore-keys: npm- | |
| - name: Install npm dependencies | |
| run: npm ci | |
| - name: Build frontend | |
| run: npx vite build | |
| - name: Configure environment | |
| run: | | |
| cp .env.example .env | |
| php artisan key:generate | |
| # Override Redis-dependent drivers for CI (no Redis available) | |
| echo "CACHE_DRIVER=array" >> .env | |
| echo "SESSION_DRIVER=array" >> .env | |
| echo "QUEUE_CONNECTION=sync" >> .env | |
| echo "SCOUT_DRIVER=null" >> .env | |
| - name: Create SQLite database | |
| run: touch database/database.sqlite | |
| - name: Run migrations | |
| run: php artisan migrate --force | |
| - name: Run tests | |
| run: php artisan test |