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:
87
87
# Compile .cds files to .cds.json files.
88
88
- name : Compile CAP CDS files
89
89
run : |
90
- for cds_file in $(find . -type f \( -iname '*.cds' \) -print)
90
+ for test_dir in $(find . -type f -name '*.expected' -exec dirname {} \;);
91
91
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
97
104
done
98
105
99
106
- name : Run test suites
@@ -105,7 +112,7 @@ jobs:
105
112
CODEQL_STDLIB_IDENT : ${{matrix.codeql_standard_library_ident}}
106
113
RUNNER_TMP : ${{ runner.temp }}
107
114
LGTM_INDEX_XML_MODE : all
108
- LGTM_INDEX_FILETYPES : " .json:JSON"
115
+ LGTM_INDEX_FILETYPES : " .json:JSON\n .cds:JSON "
109
116
110
117
shell : bash
111
118
run : >
You can’t perform that action at this time.
0 commit comments