File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4242 python -m pip install --disable-pip-version-check "$requirement"
4343 - name : Check the provider table against the installed release
4444 run : python -m unittest tests.test_provider_table_drift -v
45+ - name : Install sync artifacts with the installed CodeBoarding release
46+ shell : bash
47+ env :
48+ ACTION_PATH : ${{ github.workspace }}
49+ ANALYSIS_DIR : ${{ runner.temp }}/sync-analysis
50+ CHECKOUT_DIR : ${{ runner.temp }}/sync-checkout
51+ run : |
52+ mkdir -p "$ANALYSIS_DIR" "$CHECKOUT_DIR"
53+ printf '{"components": []}\n' > "$ANALYSIS_DIR/analysis.json"
54+ scripts/action/install-sync.sh
55+ cmp "$ANALYSIS_DIR/analysis.json" "$CHECKOUT_DIR/.codeboarding/analysis.json"
4556 - name : Render with the installed CodeBoarding release
4657 run : >-
4758 python scripts/diff_to_mermaid.py
Original file line number Diff line number Diff line change @@ -7,9 +7,9 @@ fail() { echo "::error::$1" >&2; echo "failure_reason=$1" >> "${GITHUB_OUTPUT:-/
77output=" $CHECKOUT_DIR /.codeboarding"
88mkdir -p " $output "
99# Core exposes one canonical manifest. Read from the action's directory, never the
10- # analyzed repository's, which may have a constants.py of its own.
10+ # analyzed repository's, which may have an infra package of its own.
1111manifest=" $( cd " $ACTION_PATH " && python3 - << 'PY '
12- from constants import ANALYSIS_FILENAME, PERSISTED_ANALYSIS_ARTIFACT_FILENAMES as artifacts
12+ from infra. constants import ANALYSIS_FILENAME, PERSISTED_ANALYSIS_ARTIFACT_FILENAMES as artifacts
1313print(ANALYSIS_FILENAME)
1414print(*artifacts, sep="\n")
1515PY
Original file line number Diff line number Diff line change 1616
1717
1818def write_core (path : Path ) -> None :
19- """The part of Core's constants.py (0.14.5) that names the persisted artifacts."""
19+ """Core 0.15.0's packaged artifact manifest."""
20+ path = path / "infra"
2021 path .mkdir (parents = True , exist_ok = True )
22+ (path / "__init__.py" ).touch ()
2123 (path / "constants.py" ).write_text (
2224 "ANALYSIS_FILENAME = 'analysis.json'\n "
2325 "PERSISTED_ANALYSIS_ARTIFACT_FILENAMES = (\n "
@@ -170,9 +172,10 @@ def test_installs_core_manifest_and_preserves_user_configuration(self) -> None:
170172 for directory in (output / "health" , analysis ):
171173 directory .mkdir (parents = True )
172174
173- # The analyzed repository's own constants.py must never be what is read.
174- (checkout / "constants.py" ).write_text (
175- "raise RuntimeError('imported target constants')\n " , encoding = "utf-8"
175+ # The analyzed repository's own infra package must never be imported.
176+ (checkout / "infra" ).mkdir ()
177+ (checkout / "infra" / "__init__.py" ).write_text (
178+ "raise RuntimeError('imported target infra')\n " , encoding = "utf-8"
176179 )
177180 write_core (fake_core )
178181 produced = ("analysis.json" , "fingerprint.json" , "static_analysis.pkl" )
You can’t perform that action at this time.
0 commit comments