refactor: change homepage layout and integrate HomePage component #133
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, develop, 'feature/**', 'fix/**', 'refactor/**'] | |
| pull_request: | |
| branches: [main, develop] | |
| permissions: | |
| contents: read | |
| security-events: write | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| php: ${{ steps.changes.outputs.php }} | |
| docs: ${{ steps.changes.outputs.docs }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - uses: dorny/paths-filter@v3 | |
| id: changes | |
| with: | |
| filters: | | |
| php: | |
| - 'src/**' | |
| - 'tests/**' | |
| - 'composer.json' | |
| - 'composer.lock' | |
| - 'phpunit.xml.dist' | |
| - 'phpstan.neon' | |
| - 'pint.json' | |
| docs: | |
| - 'docs/**' | |
| - 'README.md' | |
| - '*.md' | |
| lint: | |
| runs-on: ubuntu-latest | |
| needs: changes | |
| if: needs.changes.outputs.php == 'true' | |
| name: Code Style & Static Analysis | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.3' | |
| extensions: curl, mbstring, json, openssl, gd, pcntl, xml, dom, simplexml, tokenizer, intl | |
| coverage: none | |
| tools: composer:v2 | |
| - name: Cache Composer dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.composer/cache | |
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-composer- | |
| - name: Install dependencies | |
| run: composer install --no-interaction --prefer-dist --optimize-autoloader | |
| - name: Run code style checks | |
| run: composer lint | |
| - name: Run static analysis | |
| run: composer analyse | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| needs: changes | |
| if: needs.changes.outputs.php == 'true' | |
| timeout-minutes: 10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| php: ['8.3', '8.4'] | |
| stability: [prefer-stable] | |
| include: | |
| - os: ubuntu-latest | |
| php: '8.3' | |
| stability: prefer-lowest | |
| name: PHP ${{ matrix.php }} on ${{ matrix.os }} - ${{ matrix.stability }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: curl, mbstring, json, openssl, gd, pcntl, xml, dom, simplexml, tokenizer, intl | |
| coverage: none | |
| tools: composer:v2 | |
| - name: Cache Composer dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.composer/cache | |
| key: ${{ runner.os }}-php${{ matrix.php }}-${{ matrix.stability }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-php${{ matrix.php }}-${{ matrix.stability }}-composer- | |
| ${{ runner.os }}-php${{ matrix.php }}-composer- | |
| - name: Install dependencies | |
| if: matrix.stability != 'prefer-lowest' | |
| run: composer install --no-interaction --prefer-dist --optimize-autoloader ${{ matrix.os == 'windows-latest' && '--ignore-platform-req=ext-pcntl --ignore-platform-req=ext-posix' || '' }} | |
| - name: Install dependencies (prefer-lowest) | |
| if: matrix.stability == 'prefer-lowest' | |
| run: composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-lowest ${{ matrix.os == 'windows-latest' && '--ignore-platform-req=ext-pcntl --ignore-platform-req=ext-posix' || '' }} | |
| - name: Execute tests | |
| run: composer test | |
| env: | |
| NO_NETWORK: 1 | |
| coverage: | |
| runs-on: ubuntu-latest | |
| needs: changes | |
| if: needs.changes.outputs.php == 'true' | |
| timeout-minutes: 10 | |
| name: Coverage Analysis | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.3' | |
| extensions: curl, mbstring, json, openssl, gd, pcntl, xml, dom, simplexml, tokenizer, intl | |
| coverage: xdebug | |
| tools: composer:v2 | |
| - name: Cache Composer dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.composer/cache | |
| key: ${{ runner.os }}-composer-coverage-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-composer-coverage- | |
| - name: Install dependencies | |
| run: composer install --no-interaction --prefer-dist --optimize-autoloader | |
| - name: Execute tests with coverage | |
| run: composer test:coverage | |
| env: | |
| NO_NETWORK: 1 | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v4 | |
| if: github.event_name != 'schedule' | |
| with: | |
| file: ./coverage.xml | |
| fail_ci_if_error: false | |
| verbose: true | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| docs: | |
| runs-on: ubuntu-latest | |
| needs: changes | |
| if: needs.changes.outputs.docs == 'true' | |
| name: Documentation Check | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install Node dependencies | |
| run: npm ci | |
| - name: Build documentation | |
| run: npm run build | |
| - name: Check for broken links | |
| run: npm run check-links || true | |
| continue-on-error: true |