Update dependencies and automation #3
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: Continuous Integration | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| php: | |
| name: PHP quality and tests | |
| runs-on: ubuntu-latest | |
| needs: frontend | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Set up PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: "8.3" | |
| tools: composer | |
| extensions: mbstring, pdo_sqlite, sqlite3 | |
| - name: Cache Composer dependencies | |
| uses: actions/cache@v6 | |
| with: | |
| path: ~/.cache/composer/files | |
| key: ${{ runner.os }}-php-8.3-${{ hashFiles('composer.lock') }} | |
| restore-keys: ${{ runner.os }}-php-8.3- | |
| - name: Install PHP dependencies | |
| run: composer install --no-interaction --no-progress --prefer-dist | |
| - name: Download frontend assets | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: frontend-build | |
| path: public/build | |
| - name: Check PHP formatting | |
| run: | | |
| vendor/bin/pint | |
| git diff --exit-code | |
| - name: Run PHP tests | |
| env: | |
| APP_KEY: base64:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= | |
| run: php artisan test | |
| frontend: | |
| name: Frontend build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Set up PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: "8.3" | |
| tools: composer | |
| - name: Install PHP dependencies | |
| run: composer install --no-interaction --no-progress --prefer-dist | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: "24" | |
| cache: npm | |
| - name: Install Node dependencies | |
| run: npm ci --no-audit --fund=false | |
| - name: Build frontend assets | |
| run: npm run build | |
| - name: Upload frontend assets | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: frontend-build | |
| path: public/build |