Add GitHub Pages site from docs/ #11
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: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| tests-ch21: | |
| name: PHP ${{ matrix.php }} / ClickHouse 21.9 | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: ['8.0', '8.1', '8.2', '8.3', '8.4'] | |
| services: | |
| clickhouse: | |
| image: clickhouse/clickhouse-server:21.9 | |
| ports: | |
| - 8123:8123 | |
| options: >- | |
| --health-cmd "curl -f http://localhost:8123/ping" | |
| --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: curl, json | |
| coverage: none | |
| - name: Install dependencies | |
| run: composer install --no-progress --prefer-dist | |
| - name: Run tests (ClickHouse 21.9) | |
| run: ./vendor/bin/phpunit -c phpunit-ch21.xml | |
| env: | |
| CLICKHOUSE_HOST: 127.0.0.1 | |
| CLICKHOUSE_PORT: 8123 | |
| tests-ch26: | |
| name: PHP ${{ matrix.php }} / ClickHouse 26.3 | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: ['8.0', '8.1', '8.2', '8.3', '8.4'] | |
| services: | |
| clickhouse: | |
| image: clickhouse/clickhouse-server:26.3.3.20 | |
| ports: | |
| - 8124:8123 | |
| env: | |
| CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1 | |
| CLICKHOUSE_PASSWORD: "" | |
| options: >- | |
| --health-cmd "curl -f http://localhost:8123/ping" | |
| --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: curl, json | |
| coverage: none | |
| - name: Install dependencies | |
| run: composer install --no-progress --prefer-dist | |
| - name: Copy ClickHouse config for deprecated syntax | |
| run: | | |
| docker cp tests/clickhouse-latest-config/allow_deprecated.xml $(docker ps -q --filter "ancestor=clickhouse/clickhouse-server:26.3.3.20"):/etc/clickhouse-server/users.d/allow_deprecated.xml | |
| sleep 2 | |
| - name: Run tests (ClickHouse 26.3) | |
| run: ./vendor/bin/phpunit -c phpunit-ch26.xml | |
| env: | |
| CLICKHOUSE_HOST: 127.0.0.1 | |
| CLICKHOUSE_PORT: 8124 | |
| phpstan: | |
| name: PHPStan | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| extensions: curl, json | |
| coverage: none | |
| - name: Install dependencies | |
| run: composer install --no-progress --prefer-dist | |
| - name: Run PHPStan | |
| run: ./vendor/bin/phpstan analyse --memory-limit=512M | |
| phpcs: | |
| name: Code Style | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| extensions: curl, json | |
| coverage: none | |
| - name: Install dependencies | |
| run: composer install --no-progress --prefer-dist | |
| - name: Run PHPCS | |
| run: ./vendor/bin/phpcs || true |