ci: gate current release validation
This commit is contained in:
@@ -15,6 +15,14 @@ jobs:
|
|||||||
run: make
|
run: make
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: ./claro test
|
run: ./claro test
|
||||||
|
- name: Run current release validation
|
||||||
|
run: ./claro validate
|
||||||
|
- name: Validate typecheck diagnostics
|
||||||
|
run: python3 tools/validate_typecheck_diagnostics.py
|
||||||
|
- name: Validate version convention
|
||||||
|
run: python3 tools/validate_version_convention.py
|
||||||
|
- name: Validate CI workflow coverage
|
||||||
|
run: python3 tools/validate_ci_workflow.py
|
||||||
- name: Check lessons
|
- name: Check lessons
|
||||||
run: |
|
run: |
|
||||||
./claro check lessons/01_hello.claro
|
./claro check lessons/01_hello.claro
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## v1.18.26-dev CI release validation coverage
|
||||||
|
|
||||||
|
- Added `tools/validate_ci_workflow.py` to assert that Forgejo/Gitea CI keeps running Claro's current release gates.
|
||||||
|
- Updated `.forgejo/workflows/ci.yml` to run `claro validate`, typecheck diagnostics validation, version convention validation, and the CI workflow coverage check in addition to the existing smoke tests.
|
||||||
|
- Documented the CI coverage validator in the testing docs and current status/roadmap notes.
|
||||||
|
|
||||||
## v1.18.26-dev unknown object-field expression diagnostic
|
## v1.18.26-dev unknown object-field expression diagnostic
|
||||||
|
|
||||||
- Added a focused negative `claro typecheck` fixture for assigning an expression with no inferable static type to an undeclared object field, such as `SET player.level score + 1` after `NEW Player player`.
|
- Added a focused negative `claro typecheck` fixture for assigning an expression with no inferable static type to an undeclared object field, such as `SET player.level score + 1` after `NEW Player player`.
|
||||||
|
|||||||
@@ -21,6 +21,10 @@ Validated in this package:
|
|||||||
|
|
||||||
./claro validate
|
./claro validate
|
||||||
# Validation passed. Claro v1.18.26 networking reliability is ready for use.
|
# Validation passed. Claro v1.18.26 networking reliability is ready for use.
|
||||||
|
|
||||||
|
python3 tools/validate_typecheck_diagnostics.py
|
||||||
|
python3 tools/validate_version_convention.py
|
||||||
|
python3 tools/validate_ci_workflow.py
|
||||||
```
|
```
|
||||||
|
|
||||||
## Beginner-first syntax
|
## Beginner-first syntax
|
||||||
|
|||||||
@@ -156,6 +156,7 @@ Ready now:
|
|||||||
- metadata JSON
|
- metadata JSON
|
||||||
- completion list
|
- completion list
|
||||||
- diagnostics helper
|
- diagnostics helper
|
||||||
|
- Forgejo/Gitea CI coverage for the current release validation gates (`claro validate`, typecheck diagnostics validation, version convention validation, and the CI workflow coverage check)
|
||||||
|
|
||||||
Still needed:
|
Still needed:
|
||||||
- syntax highlighting package
|
- syntax highlighting package
|
||||||
|
|||||||
+1
-1
@@ -31,7 +31,7 @@ See `CURRENT_STATUS.md` for the detailed feature matrix.
|
|||||||
|
|
||||||
1. Keep beginner-facing docs current and separate from historical release notes.
|
1. Keep beginner-facing docs current and separate from historical release notes.
|
||||||
2. Keep examples aligned with the modern simple syntax (`END`, `DO`, short `SET`, short `ASK`) while documenting older compatibility forms separately.
|
2. Keep examples aligned with the modern simple syntax (`END`, `DO`, short `SET`, short `ASK`) while documenting older compatibility forms separately.
|
||||||
3. Expand validation around typecheck diagnostics and package/networking safety. Current object-method parameter validation covers one correct `DO object.method ...` call, one wrong-type diagnostic, missing-object guidance when `DO player.method ...` appears before `NEW`, and a class-specific unknown-method diagnostic when a learner calls a method the class does not declare; object-field validation covers correct NUMBER, TEXT, and YESNO direct `SET object.field value` assignments, direct `CHECK TYPE` metadata acceptance for NUMBER/TEXT/YESNO fields, negative NUMBER/TEXT/YESNO metadata mismatches, NUMBER/TEXT/YESNO-expectation unknown-field `CHECK TYPE` diagnostics, missing-object field assignment and `CHECK TYPE` diagnostics, NUMBER/TEXT/YESNO wrong-type direct assignments, simple NUMBER/TEXT/YESNO-valued unknown-field diagnostics after `NEW Class object`, and a beginner-facing fallback when the unknown field's assigned expression type is not inferable yet.
|
3. Expand validation around typecheck diagnostics and package/networking safety. Current Forgejo/Gitea CI runs the documented release gates (`claro validate`, typecheck diagnostics validation, version convention validation, and CI workflow coverage validation). Current object-method parameter validation covers one correct `DO object.method ...` call, one wrong-type diagnostic, missing-object guidance when `DO player.method ...` appears before `NEW`, and a class-specific unknown-method diagnostic when a learner calls a method the class does not declare; object-field validation covers correct NUMBER, TEXT, and YESNO direct `SET object.field value` assignments, direct `CHECK TYPE` metadata acceptance for NUMBER/TEXT/YESNO fields, negative NUMBER/TEXT/YESNO metadata mismatches, NUMBER/TEXT/YESNO-expectation unknown-field `CHECK TYPE` diagnostics, missing-object field assignment and `CHECK TYPE` diagnostics, NUMBER/TEXT/YESNO wrong-type direct assignments, simple NUMBER/TEXT/YESNO-valued unknown-field diagnostics after `NEW Class object`, and a beginner-facing fallback when the unknown field's assigned expression type is not inferable yet.
|
||||||
4. Add small examples for each foundation feature before adding bigger syntax.
|
4. Add small examples for each foundation feature before adding bigger syntax.
|
||||||
|
|
||||||
## Complete-platform milestones
|
## Complete-platform milestones
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ Validate the current v1.18.26 package after building:
|
|||||||
./claro validate
|
./claro validate
|
||||||
python tools/validate_typecheck_diagnostics.py
|
python tools/validate_typecheck_diagnostics.py
|
||||||
python tools/validate_version_convention.py
|
python tools/validate_version_convention.py
|
||||||
|
python tools/validate_ci_workflow.py
|
||||||
```
|
```
|
||||||
|
|
||||||
Useful focused validation scripts:
|
Useful focused validation scripts:
|
||||||
@@ -39,6 +40,8 @@ python tools/validate_lsp_helper.py
|
|||||||
python tools/validate_package_security.py
|
python tools/validate_package_security.py
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The Forgejo/Gitea CI workflow is expected to run the current release gates above, not only the older smoke tests. `tools/validate_ci_workflow.py` checks that coverage so CI does not drift away from the documented package validation path.
|
||||||
|
|
||||||
Older `validate_rc*.py` scripts are kept for historical release notes. They are not the recommended current package validation path.
|
Older `validate_rc*.py` scripts are kept for historical release notes. They are not the recommended current package validation path.
|
||||||
|
|
||||||
On Windows, after `build.bat` or `build.ps1`, run the same Python commands from the project root.
|
On Windows, after `build.bat` or `build.ps1`, run the same Python commands from the project root.
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Validate that CI runs Claro's current release gates, not only legacy smoke tests."""
|
||||||
|
from pathlib import Path
|
||||||
|
import sys
|
||||||
|
|
||||||
|
ROOT = Path(__file__).resolve().parents[1]
|
||||||
|
WORKFLOW = ROOT / ".forgejo" / "workflows" / "ci.yml"
|
||||||
|
|
||||||
|
REQUIRED_COMMANDS = [
|
||||||
|
"./claro validate",
|
||||||
|
"python3 tools/validate_typecheck_diagnostics.py",
|
||||||
|
"python3 tools/validate_version_convention.py",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> int:
|
||||||
|
if not WORKFLOW.exists():
|
||||||
|
print(f"Missing CI workflow: {WORKFLOW.relative_to(ROOT)}")
|
||||||
|
return 1
|
||||||
|
|
||||||
|
text = WORKFLOW.read_text(encoding="utf-8")
|
||||||
|
missing = [command for command in REQUIRED_COMMANDS if command not in text]
|
||||||
|
if missing:
|
||||||
|
print("CI workflow is missing current release validation commands:")
|
||||||
|
for command in missing:
|
||||||
|
print(f" - {command}")
|
||||||
|
print("Add them to .forgejo/workflows/ci.yml so regressions are caught before release.")
|
||||||
|
return 1
|
||||||
|
|
||||||
|
print("CI workflow validation complete")
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
sys.exit(main())
|
||||||
Reference in New Issue
Block a user