feat: server action webhooks #157
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: Tests | |
| on: | |
| pull_request: | |
| push: | |
| jobs: | |
| tests: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: [8.4, 8.5] | |
| db: [mysql, mariadb, pgsql] | |
| runs-on: blacksmith-2vcpu-ubuntu-2404 | |
| timeout-minutes: 15 | |
| services: | |
| mysql: | |
| image: mysql:8.0 | |
| env: | |
| MYSQL_ALLOW_EMPTY_PASSWORD: yes | |
| MYSQL_DATABASE: testing | |
| ports: | |
| - 3306:3306 | |
| options: >- | |
| --health-cmd="mysqladmin ping" | |
| --health-interval=10s | |
| --health-timeout=5s | |
| --health-retries=5 | |
| mariadb: | |
| image: mariadb:10.5 | |
| env: | |
| MYSQL_ALLOW_EMPTY_PASSWORD: yes | |
| MYSQL_DATABASE: testing | |
| ports: | |
| - 3307:3306 | |
| options: >- | |
| --health-cmd="mysqladmin ping" | |
| --health-interval=10s | |
| --health-timeout=5s | |
| --health-retries=5 | |
| pgsql: | |
| image: postgres:18 | |
| env: | |
| POSTGRES_DB: testing | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd="pg_isready" | |
| --health-interval=10s | |
| --health-timeout=5s | |
| --health-retries=5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: bcmath, gd, pdo, ${{ matrix.db == 'pgsql' && 'pdo_pgsql' || 'pdo_mysql' }}, zip | |
| tools: composer | |
| - name: Get composer cache directory | |
| id: composer-cache | |
| run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
| - name: Cache composer dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} | |
| restore-keys: ${{ runner.os }}-composer- | |
| - name: Install dependencies | |
| run: composer install --no-interaction --prefer-dist | |
| - name: Prepare environment (${{ matrix.db }}) | |
| run: | | |
| cp .env.ci .env | |
| php artisan key:generate | |
| if [ "${{ matrix.db }}" = "pgsql" ]; then | |
| echo "DB_CONNECTION=pgsql" >> .env | |
| echo "DB_HOST=127.0.0.1" >> .env | |
| echo "DB_USERNAME=postgres" >> .env | |
| echo "DB_PASSWORD=postgres" >> .env | |
| elif [ "${{ matrix.db }}" = "mariadb" ]; then | |
| echo "DB_HOST=127.0.0.1" >> .env | |
| echo "DB_PORT=3307" >> .env | |
| fi | |
| - name: Run tests | |
| run: php vendor/bin/phpunit | |
| build-dev: | |
| if: github.event_name == 'push' | |
| needs: tests | |
| runs-on: blacksmith-2vcpu-ubuntu-2404 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build dev image | |
| run: docker compose -f docker-compose.develop.yml build panel |