Merge pull request #6 from MujahidAbbas/feature/markdown-preview-impr… #23
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] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.3' | |
| extensions: mbstring, sqlite3, pdo_sqlite | |
| coverage: none | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install Composer dependencies | |
| run: composer install --no-interaction --prefer-dist | |
| - name: Install NPM dependencies | |
| run: npm ci | |
| - name: Build assets | |
| run: npm run build | |
| - name: Copy environment file | |
| run: cp .env.example .env | |
| - name: Generate application key | |
| run: php artisan key:generate | |
| - name: Create SQLite database | |
| run: touch database/database.sqlite | |
| - name: Run migrations | |
| run: php artisan migrate --force | |
| - name: Run Pest tests | |
| run: ./vendor/bin/pest | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.3' | |
| extensions: mbstring | |
| coverage: none | |
| - name: Install Composer dependencies | |
| run: composer install --no-interaction --prefer-dist | |
| - name: Run Laravel Pint | |
| run: ./vendor/bin/pint --test |