File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -87,13 +87,20 @@ jobs:
8787 # Compile .cds files to .cds.json files.
8888 - name : Compile CAP CDS files
8989 run : |
90- for cds_file in $(find . -type f \( -iname '*.cds' \) -print)
90+ for test_dir in $(find . -type f -name '*.expected' -exec dirname {} \;);
9191 do
92- echo "I am compiling $cds_file"
93- cds compile $cds_file \
94- -2 json \
95- -o "$cds_file.json" \
96- --locations
92+ # The CDS compiler produces locations relative to the working directory
93+ # so we switch to the test directory before running the compiler.
94+ pushd $test_dir
95+ for cds_file in $(find . -type f \( -iname '*.cds' \) -print)
96+ do
97+ echo "I am compiling $cds_file"
98+ cds compile $cds_file \
99+ -2 json \
100+ -o "$cds_file.json" \
101+ --locations
102+ done
103+ popd
97104 done
98105
99106 - name : Run test suites
@@ -105,7 +112,7 @@ jobs:
105112 CODEQL_STDLIB_IDENT : ${{matrix.codeql_standard_library_ident}}
106113 RUNNER_TMP : ${{ runner.temp }}
107114 LGTM_INDEX_XML_MODE : all
108- LGTM_INDEX_FILETYPES : " .json:JSON"
115+ LGTM_INDEX_FILETYPES : " .json:JSON\n .cds:JSON "
109116
110117 shell : bash
111118 run : >
You can’t perform that action at this time.
0 commit comments