Integration Tests (Windows) #51
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: Integration Tests (Windows) | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 8 * * *' | |
| env: | |
| POSTGRES_USER: runner | |
| POSTGRES_PASSWORD: "" | |
| POSTGRES_DB: postgres | |
| jobs: | |
| vitest: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: | |
| - 8.4 | |
| os: | |
| - windows-latest | |
| env: | |
| POSTGRES_USER: ${{ matrix.os == 'windows-latest' && 'postgres' || 'runner' }} | |
| name: "Run tests: ${{ matrix.os }}" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: dom, curl, libxml, mbstring, pcntl, fileinfo, pdo, sqlite, pdo_sqlite, pdo_mysql, pdo_pgsql, intl, ftp, zip | |
| coverage: pcov | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Run build | |
| run: bun run build | |
| - name: Run tests | |
| run: bun run test | |
| phpunit: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - windows-latest | |
| php: | |
| - 8.4 | |
| database: | |
| - sqlite | |
| - mysql | |
| - postgres | |
| stability: | |
| - prefer-stable | |
| env: | |
| POSTGRES_USER: ${{ matrix.os == 'windows-latest' && 'postgres' || 'runner' }} | |
| name: "Run tests: PHP ${{ matrix.php }} - ${{ matrix.database }} - ${{ matrix.stability }} - ${{ matrix.os }}" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: dom, curl, libxml, mbstring, pcntl, fileinfo, pdo, sqlite, pdo_sqlite, pdo_mysql, pdo_pgsql, intl, ftp, zip | |
| coverage: pcov | |
| - name: Setup problem matchers | |
| run: | | |
| echo "::add-matcher::${{ runner.tool_cache }}/php.json" | |
| echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
| - name: Install dependencies | |
| run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction | |
| - name: "Setup Redis" | |
| if: ${{ matrix.os != 'windows-latest' }} | |
| uses: supercharge/[email protected] | |
| - name: "Setup MySQL" | |
| if: ${{ matrix.database == 'mysql' }} | |
| uses: ankane/setup-mysql@v1 | |
| with: | |
| mysql-version: 8.0 | |
| database: "app" | |
| - name: "Setup PostgreSQL" | |
| if: ${{ matrix.database == 'postgres' }} | |
| uses: ankane/setup-postgres@v1 | |
| - name: Set database config - ${{ matrix.database }} | |
| run: php -r "copy('tests/Fixtures/Config/database.${{ matrix.database }}.php', 'tests/Fixtures/Config/database.config.php');" | |
| - name: Tempest about | |
| run: php ./tempest about -v | |
| - name: List discovered locations | |
| run: php ./tempest discovery:status | |
| - name: Execute tests | |
| run: php -d"error_reporting = E_ALL & ~E_DEPRECATED" -dmemory_limit=1G vendor/bin/phpunit |