|
| 1 | +name: Integration Tests (Windows) |
| 2 | + |
| 3 | +on: |
| 4 | + schedule: |
| 5 | + - cron: '0 8 * * *' |
| 6 | + |
| 7 | +jobs: |
| 8 | + vitest: |
| 9 | + runs-on: ${{ matrix.os }} |
| 10 | + strategy: |
| 11 | + fail-fast: false |
| 12 | + matrix: |
| 13 | + php: |
| 14 | + - 8.4 |
| 15 | + os: |
| 16 | + - windows-latest |
| 17 | + |
| 18 | + name: "Run tests: ${{ matrix.os }}" |
| 19 | + |
| 20 | + steps: |
| 21 | + - name: Checkout code |
| 22 | + uses: actions/checkout@v4 |
| 23 | + |
| 24 | + - name: Setup PHP |
| 25 | + uses: shivammathur/setup-php@v2 |
| 26 | + with: |
| 27 | + php-version: ${{ matrix.php }} |
| 28 | + extensions: dom, curl, libxml, mbstring, pcntl, fileinfo, pdo, sqlite, pdo_sqlite, pdo_mysql, pdo_pgsql intl, ftp, zip |
| 29 | + coverage: pcov |
| 30 | + |
| 31 | + - name: Setup Bun |
| 32 | + uses: oven-sh/setup-bun@v2 |
| 33 | + |
| 34 | + - name: Install dependencies |
| 35 | + run: bun install --frozen-lockfile |
| 36 | + |
| 37 | + - name: Run build |
| 38 | + run: bun run build |
| 39 | + |
| 40 | + - name: Run tests |
| 41 | + run: bun run test |
| 42 | + |
| 43 | + phpunit: |
| 44 | + runs-on: ${{ matrix.os }} |
| 45 | + strategy: |
| 46 | + fail-fast: false |
| 47 | + matrix: |
| 48 | + os: |
| 49 | + - windows-latest |
| 50 | + php: |
| 51 | + - 8.4 |
| 52 | + database: |
| 53 | + - sqlite |
| 54 | + - mysql |
| 55 | + stability: |
| 56 | + - prefer-stable |
| 57 | + |
| 58 | + name: "Run tests: PHP ${{ matrix.php }} - ${{ matrix.database }} - ${{ matrix.stability }} - ${{ matrix.os }}" |
| 59 | + |
| 60 | + steps: |
| 61 | + - name: Checkout code |
| 62 | + uses: actions/checkout@v4 |
| 63 | + |
| 64 | + - name: Setup PHP |
| 65 | + uses: shivammathur/setup-php@v2 |
| 66 | + with: |
| 67 | + php-version: ${{ matrix.php }} |
| 68 | + extensions: dom, curl, libxml, mbstring, pcntl, fileinfo, pdo, sqlite, pdo_sqlite, pdo_mysql, intl, ftp, zip |
| 69 | + coverage: pcov |
| 70 | + |
| 71 | + - name: Setup problem matchers |
| 72 | + run: | |
| 73 | + echo "::add-matcher::${{ runner.tool_cache }}/php.json" |
| 74 | + echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" |
| 75 | +
|
| 76 | + - name: Install dependencies |
| 77 | + run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction |
| 78 | + |
| 79 | + - name: "Setup Redis" |
| 80 | + if: ${{ matrix.os != 'windows-latest' }} |
| 81 | + uses: supercharge/[email protected] |
| 82 | + |
| 83 | + - name: "Setup MySQL" |
| 84 | + if: ${{ matrix.database == 'mysql' }} |
| 85 | + uses: ankane/setup-mysql@v1 |
| 86 | + with: |
| 87 | + mysql-version: 8.0 |
| 88 | + database: "app" |
| 89 | + |
| 90 | + - name: "Setup PostgreSQL" |
| 91 | + if: ${{ matrix.database == 'postgres' }} |
| 92 | + uses: ankane/setup-postgres@v1 |
| 93 | + |
| 94 | + - name: Set database config - ${{ matrix.database }} |
| 95 | + run: php -r "copy('tests/Fixtures/Config/database.${{ matrix.database }}.php', 'tests/Fixtures/Config/database.config.php');" |
| 96 | + |
| 97 | + - name: Tempest about |
| 98 | + run: php ./tempest about -v |
| 99 | + |
| 100 | + - name: List discovered locations |
| 101 | + run: php ./tempest discovery:status |
| 102 | + |
| 103 | + - name: Execute tests |
| 104 | + run: php -d"error_reporting = E_ALL & ~E_DEPRECATED" -dmemory_limit=1G vendor/bin/phpunit |
0 commit comments