Skip to content

Commit cf9ef85

Browse files
authored
ci: run windows integration tests as cron (#1676)
1 parent 1af3b23 commit cf9ef85

File tree

2 files changed

+109
-5
lines changed

2 files changed

+109
-5
lines changed
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
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

.github/workflows/integration-tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- 8.4
2424
os:
2525
- ubuntu-latest
26-
- windows-latest
26+
# - windows-latest
2727

2828
name: "Run tests: ${{ matrix.os }}"
2929

@@ -57,7 +57,7 @@ jobs:
5757
matrix:
5858
os:
5959
- ubuntu-latest
60-
- windows-latest
60+
# - windows-latest
6161
php:
6262
- 8.4
6363
database:
@@ -67,9 +67,9 @@ jobs:
6767
stability:
6868
- prefer-stable
6969
- prefer-lowest
70-
exclude:
71-
- os: windows-latest
72-
database: postgres
70+
# exclude:
71+
# - os: windows-latest
72+
# database: postgres
7373

7474
name: "Run tests: PHP ${{ matrix.php }} - ${{ matrix.database }} - ${{ matrix.stability }} - ${{ matrix.os }}"
7575

0 commit comments

Comments
 (0)