Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/local-ci-matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ Defaults are exported from [`script/ci-defaults.env`](../script/ci-defaults.env)
| `JIT_PREFLIGHT_GATE` | `0` | `ci-fast.sh` | Early MCJIT probe after `composer install` ([#728](https://github.com/PurHur/php-compiler/issues/728)) |
| `M2_SPINE_ISSUE_HYGIENE_GATE` | `1` | `ci-fast.sh` (`ci_run_inventory_checks`) | `script/check-m2-spine-issue-hygiene.php` — stale `m2-spine-unit` tickets ([#1819](https://github.com/PurHur/php-compiler/issues/1819), [#1808](https://github.com/PurHur/php-compiler/issues/1808)); set `0` for bulk spine PRs |
| `WAVE3_ROADMAP_SYNC_GATE` | `1` | `ci-fast.sh` (`ci_run_inventory_checks`) | `script/check-wave3-roadmap-sync.php` ([#1802](https://github.com/PurHur/php-compiler/issues/1802), [#1814](https://github.com/PurHur/php-compiler/issues/1814)); set `0` for doc-only iteration |
| `EXAMPLES_README_SYNC_GATE` | `1` | `ci-fast.sh` (`ci_run_inventory_checks`) | `script/check-examples-readme-sync.php` ([#1822](https://github.com/PurHur/php-compiler/issues/1822), [#1531](https://github.com/PurHur/php-compiler/issues/1531)); set `0` for doc-only iteration |

Ladder-only env vars (not in `ci-defaults.env`): `MINIWEBAPP_LINT_GATE` (default `1` in `web-smoke.sh`), `MINIWEBAPP_AOT_BISECT_GATE` (default `0` in `miniwebapp-gates.sh` — [#879](https://github.com/PurHur/php-compiler/issues/879)).

Expand Down
2 changes: 1 addition & 1 deletion script/ci-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ ci_run_m2_spine_issue_hygiene_check() {
}

ci_run_examples_readme_sync_check() {
if [[ "${EXAMPLES_README_SYNC_GATE:-0}" != "1" ]]; then
if [[ "${EXAMPLES_README_SYNC_GATE:-1}" != "1" ]]; then
return 0
fi
echo "Examples README sync (EXAMPLES_README_SYNC_GATE=1, issue #1822)..."
Expand Down
1 change: 1 addition & 0 deletions script/ci-defaults.env
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ export BOOTSTRAP_LOOP_PROBE_GATE="${BOOTSTRAP_LOOP_PROBE_GATE:-0}"
export CAPABILITY_SYNTAX_CHECK="${CAPABILITY_SYNTAX_CHECK:-1}"
export M2_SPINE_ISSUE_HYGIENE_GATE="${M2_SPINE_ISSUE_HYGIENE_GATE:-1}" # default on (#1819); opt-out for bulk spine PRs
export WAVE3_ROADMAP_SYNC_GATE="${WAVE3_ROADMAP_SYNC_GATE:-1}" # default on (#1814); opt-out WAVE3_ROADMAP_SYNC_GATE=0 for doc-only iteration
export EXAMPLES_README_SYNC_GATE="${EXAMPLES_README_SYNC_GATE:-1}" # default on (#1822); opt-out EXAMPLES_README_SYNC_GATE=0 for doc-only iteration
2 changes: 1 addition & 1 deletion script/ci-docker-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ ci_docker_run() {
-e "JIT_PREFLIGHT_GATE=${JIT_PREFLIGHT_GATE:-}" \
-e "WAVE3_ROADMAP_SYNC_GATE=${WAVE3_ROADMAP_SYNC_GATE:-1}" \
-e "M2_SPINE_ISSUE_HYGIENE_GATE=${M2_SPINE_ISSUE_HYGIENE_GATE:-1}" \
-e "EXAMPLES_README_SYNC_GATE=${EXAMPLES_README_SYNC_GATE:-0}" \
-e "EXAMPLES_README_SYNC_GATE=${EXAMPLES_README_SYNC_GATE:-1}" \
"$@"
}
28 changes: 28 additions & 0 deletions test/unit/CiScriptsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,26 @@ public function testCiDockerRunPassesWave3RoadmapSyncGateDefaultOn(): void
$this->assertStringContainsString('WAVE3_ROADMAP_SYNC_GATE=${WAVE3_ROADMAP_SYNC_GATE:-1}', $body);
}

public function testCiDefaultsEnvDefinesExamplesReadmeSyncGateOn(): void
{
$defaults = (string) file_get_contents(dirname(__DIR__, 2).'/script/ci-defaults.env');
$this->assertStringContainsString('EXAMPLES_README_SYNC_GATE="${EXAMPLES_README_SYNC_GATE:-1}"', $defaults);
}

public function testCiFastRunsExamplesReadmeSyncViaInventoryChecks(): void
{
$common = (string) file_get_contents(dirname(__DIR__, 2).'/script/ci-common.sh');
$this->assertStringContainsString('ci_run_examples_readme_sync_check', $common);
$this->assertStringContainsString('check-examples-readme-sync.php', $common);
$this->assertStringContainsString('EXAMPLES_README_SYNC_GATE:-1', $common);
}

public function testCiDockerRunPassesExamplesReadmeSyncGateDefaultOn(): void
{
$body = (string) file_get_contents(dirname(__DIR__, 2).'/script/ci-docker-run.sh');
$this->assertStringContainsString('EXAMPLES_README_SYNC_GATE=${EXAMPLES_README_SYNC_GATE:-1}', $body);
}

public function testCiDefaultsEnvDefinesExamplesAotSmokeGateOn(): void
{
$defaults = (string) file_get_contents(dirname(__DIR__, 2).'/script/ci-defaults.env');
Expand Down Expand Up @@ -440,6 +460,14 @@ public function testLocalCiMatrixDocumentsWave3RoadmapSyncGate(): void
$this->assertMatchesRegularExpression('/\| `WAVE3_ROADMAP_SYNC_GATE` \| `1` \|/', $doc);
}

public function testLocalCiMatrixDocumentsExamplesReadmeSyncGate(): void
{
$doc = (string) file_get_contents(dirname(__DIR__, 2).'/docs/local-ci-matrix.md');
$this->assertStringContainsString('EXAMPLES_README_SYNC_GATE', $doc);
$this->assertStringContainsString('check-examples-readme-sync.php', $doc);
$this->assertMatchesRegularExpression('/\| `EXAMPLES_README_SYNC_GATE` \| `1` \|/', $doc);
}

public function testLocalCiMatrixDocumentsMiniWebAppGates(): void
{
$doc = (string) file_get_contents(dirname(__DIR__, 2).'/docs/local-ci-matrix.md');
Expand Down