Skip to content

Add documentation search feature (#154) #25

Add documentation search feature (#154)

Add documentation search feature (#154) #25

Workflow file for this run

name: Build
on:
push:
branches: ['main']
pull_request:
branches: ['main']
workflow_dispatch:
jobs:
PHPUnit:
strategy:
fail-fast: false
matrix:
php_versions: ['8.4']
runs-on: ubuntu-latest
name: PHPUnit - PHP ${{ matrix.php_versions }}
steps:
- uses: actions/checkout@v4
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_versions }}
extensions: mbstring, dom, fileinfo, gd
coverage: xdebug
tools: pecl, composer
- name: Install Dependencies
run: composer install --prefer-dist --no-progress
- name: Execute tests
run: |
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
vendor/bin/phpunit
- name: Upload coverage to Codecov
if: github.event_name != 'schedule'
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./_meta/coverage.xml
fail_ci_if_error: true
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
files: ./_meta/junit.xml
token: ${{ secrets.CODECOV_TOKEN }}
PHPStan:
strategy:
fail-fast: false
matrix:
php_versions: ['8.4']
runs-on: ubuntu-latest
name: PHPStan - PHP ${{ matrix.php_versions }}
steps:
- uses: actions/checkout@v4
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_versions }}
- name: Install Dependencies
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Run PHPStan
run: vendor/bin/phpstan analyse
Vite:
strategy:
fail-fast: false
matrix:
node_versions: [24]
runs-on: ubuntu-latest
name: Vite Build - Node ${{ matrix.node_versions }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_versions }}
- name: Install Dependencies
run: npm ci
- name: Test
run: npm run vite:build
Prettier:
strategy:
fail-fast: false
matrix:
node_versions: [24]
runs-on: ubuntu-latest
name: Prettier - Node ${{ matrix.node_versions }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_versions }}
- name: Install Dependencies
run: npm ci
- name: Prettier dry run
run: npm run format-dry-run
- name: TypeCheck
run: npm run typecheck
- name: Eslint
run: npm run lint
PHP-CS-Fixer:
runs-on: ubuntu-latest
name: PHP-CS-Fixer
steps:
- uses: actions/checkout@v4
- name: PHP-CS-Fixer
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --diff --dry-run
Deploy:
name: Deploy code to prod
runs-on: ubuntu-latest
needs: [PHPUnit, PHPStan, Vite, Prettier, PHP-CS-Fixer]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Deploy
uses: deployphp/action@v1
with:
deployer-version: "7.3.0"
dep: deploy prod -f .github/deploy.php
private-key: ${{ secrets.PRIVATE_KEY }}