Skip to content

Commit 2574ed9

Browse files
committed
Add nightly build for active branches
Fixes #6305
1 parent 721260c commit 2574ed9

File tree

2 files changed

+83
-12
lines changed

2 files changed

+83
-12
lines changed

.github/workflows/ci.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
on:
44
pull_request: null
55
push: null
6-
schedule:
7-
- cron: "15 0 * * *"
86

97
name: CI
108

@@ -43,8 +41,6 @@ jobs:
4341
coding-guidelines:
4442
name: Coding Guidelines
4543

46-
if: github.event_name != 'schedule'
47-
4844
runs-on: ubuntu-latest
4945
timeout-minutes: 5
5046

@@ -66,8 +62,6 @@ jobs:
6662
static-analysis:
6763
name: Static Analysis
6864

69-
if: github.event_name != 'schedule'
70-
7165
needs:
7266
- dependency-validation
7367

@@ -199,8 +193,6 @@ jobs:
199193
code-coverage:
200194
name: Code Coverage
201195

202-
if: github.event_name != 'schedule'
203-
204196
needs:
205197
- end-to-end-tests
206198

@@ -255,8 +247,6 @@ jobs:
255247
build-phar:
256248
name: Build PHAR
257249

258-
if: github.event_name != 'schedule'
259-
260250
needs:
261251
- end-to-end-tests
262252

@@ -303,8 +293,6 @@ jobs:
303293
test-phar:
304294
name: Test PHAR
305295

306-
if: github.event_name != 'schedule'
307-
308296
needs:
309297
- build-phar
310298

.github/workflows/nightly.yaml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# https://docs.github.com/en/actions
2+
3+
on:
4+
schedule:
5+
- cron: "15 0 * * *"
6+
workflow_dispatch: ~
7+
8+
name: Nightly
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
run-tests:
15+
name: Tests
16+
17+
runs-on: ${{ matrix.os }}
18+
timeout-minutes: 5
19+
20+
env:
21+
PHP_EXTENSIONS: none, ctype, curl, dom, json, libxml, mbstring, openssl, pdo, phar, tokenizer, xml, xmlwriter
22+
PHP_INI_VALUES: memory_limit=-1, zend.assertions=1, error_reporting=-1, log_errors_max_len=0, display_errors=On
23+
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
os:
28+
- ubuntu-latest
29+
- windows-latest
30+
31+
phpunit-branch:
32+
- main
33+
- 12.3
34+
- 11.5
35+
- 10.5
36+
- 9.6
37+
- 8.5
38+
39+
php-version:
40+
- 8.1
41+
- 8.2
42+
- 8.3
43+
- 8.4
44+
- 8.5
45+
46+
exclude:
47+
- phpunit-branch: main
48+
php-version: 8.1
49+
- phpunit-branch: main
50+
php-version: 8.2
51+
- phpunit-branch: 12.3
52+
php-version: 8.1
53+
- phpunit-branch: 12.3
54+
php-version: 8.2
55+
- phpunit-branch: 11.5
56+
php-version: 8.1
57+
58+
steps:
59+
- name: Configure Git to avoid issues with line endings
60+
if: matrix.os == 'windows-latest'
61+
run: git config --global core.autocrlf false
62+
63+
- name: Checkout
64+
uses: actions/checkout@v5
65+
with:
66+
ref: ${{ matrix.phpunit-branch }}
67+
68+
- name: Install PHP with extensions
69+
uses: shivammathur/setup-php@v2
70+
with:
71+
php-version: ${{ matrix.php-version }}
72+
extensions: ${{ env.PHP_EXTENSIONS }}
73+
ini-values: ${{ env.PHP_INI_VALUES }}
74+
tools: none
75+
76+
- name: Install dependencies with Composer
77+
run: php ./tools/composer install --no-ansi --no-interaction --no-progress
78+
79+
- name: Run unit tests with PHPUnit
80+
run: php ./phpunit --testsuite unit --order-by depends,random
81+
82+
- name: Run end-to-end tests with PHPUnit
83+
run: php ./phpunit --testsuite end-to-end --order-by depends,random

0 commit comments

Comments
 (0)