Skip to content

Commit 8ac497a

Browse files
committed
Renormalize after .gitattributes update
1 parent a8ee2c2 commit 8ac497a

File tree

1 file changed

+156
-156
lines changed

1 file changed

+156
-156
lines changed
Lines changed: 156 additions & 156 deletions
Original file line numberDiff line numberDiff line change
@@ -1,156 +1,156 @@
1-
name: QL Unit Tests (Linux)
2-
3-
on:
4-
push:
5-
branches:
6-
- 'main'
7-
pull_request:
8-
branches:
9-
- 'main'
10-
workflow_dispatch:
11-
12-
permissions:
13-
contents: read
14-
15-
jobs:
16-
create-unit-test-matrix:
17-
name: Create CodeQL Unit Test Matrix
18-
runs-on: ubuntu-latest
19-
outputs:
20-
matrix: ${{ steps.export-unit-test-matrix.outputs.matrix }}
21-
steps:
22-
- name: Checkout repository
23-
uses: actions/checkout@v6
24-
25-
- name: Install QLT
26-
id: install-qlt
27-
uses: advanced-security/codeql-development-toolkit/.github/actions/install-qlt@main
28-
with:
29-
qlt-version: 'latest'
30-
add-to-path: true
31-
32-
- name: Export unit test matrix
33-
id: export-unit-test-matrix
34-
run: |
35-
qlt test run get-matrix --os-version ubuntu-latest
36-
37-
run-test-suites:
38-
name: Run Unit Tests
39-
needs: create-unit-test-matrix
40-
41-
runs-on: ${{ matrix.os }}
42-
strategy:
43-
fail-fast: false
44-
matrix: ${{ fromJSON(needs.create-unit-test-matrix.outputs.matrix) }}
45-
46-
steps:
47-
- name: Checkout repository
48-
uses: actions/checkout@v6
49-
50-
- name: Install QLT
51-
id: install-qlt
52-
uses: advanced-security/codeql-development-toolkit/.github/actions/install-qlt@main
53-
with:
54-
qlt-version: 'latest'
55-
add-to-path: true
56-
57-
- name: Install CodeQL
58-
id: install-codeql
59-
shell: bash
60-
run: |
61-
echo "Installing CodeQL"
62-
qlt codeql run install
63-
echo "-----------------------------"
64-
echo "CodeQL Home: $QLT_CODEQL_HOME"
65-
echo "CodeQL Binary: $QLT_CODEQL_PATH"
66-
67-
- name: Verify Versions of Tooling
68-
shell: bash
69-
run: |
70-
echo -e "Checking CodeQL Version:"
71-
$QLT_CODEQL_PATH --version
72-
73-
echo -e "Checking QLT Version:"
74-
echo "QLT Home: ${{ steps.install-qlt.outputs.qlt-home }}"
75-
qlt version
76-
77-
- name: Install QL Packs
78-
shell: bash
79-
run: |
80-
qlt query run install-packs
81-
82-
- name: Setup Node.js for CDS compilation
83-
uses: actions/setup-node@v6
84-
with:
85-
node-version: '20'
86-
cache: 'npm'
87-
cache-dependency-path: 'extractors/cds/tools/package-lock.json'
88-
89-
- name: Verify Node.js and npm tools
90-
run: |
91-
echo "Node.js version: $(node --version)"
92-
echo "npm version: $(npm --version)"
93-
echo "npx version: $(npx --version)"
94-
# Verify npx can access @sap/cds-dk without installing globally
95-
echo "Testing npx access to @sap/cds-dk..."
96-
npx --yes --package @sap/cds-dk@latest cds --version || echo "CDS will be installed per-project as needed"
97-
98-
# Compile .cds files to .cds.json files using the dedicated test script
99-
- name: Compile CAP CDS files
100-
run: |
101-
# Use the dedicated CDS compilation script that includes proper version resolution
102-
# This script follows the same logic as the CDS extractor's resolveCdsVersions function
103-
./extractors/cds/tools/workflow/cds-compilation-for-actions.sh
104-
105-
- name: Run test suites
106-
id: run-test-suites
107-
env:
108-
RUNNER_OS: ${{ runner.os }}
109-
CODEQL_CLI: ${{ matrix.codeql_cli }}
110-
CODEQL_STDLIB: ${{ matrix.codeql_standard_library }}
111-
CODEQL_STDLIB_IDENT: ${{matrix.codeql_standard_library_ident}}
112-
RUNNER_TMP: ${{ runner.temp }}
113-
LGTM_INDEX_XML_MODE: all
114-
LGTM_INDEX_FILETYPES: ".json:JSON\n.cds:JSON"
115-
116-
shell: bash
117-
run: >
118-
qlt test run execute-unit-tests
119-
--codeql-args "--threads=0 --strict-test-discovery"
120-
--num-threads 2
121-
--language javascript
122-
--runner-os $RUNNER_OS
123-
--work-dir $RUNNER_TMP
124-
125-
- name: Upload test results
126-
uses: actions/upload-artifact@v6
127-
with:
128-
name: test-results-${{ runner.os }}-${{ matrix.codeql_cli }}-${{ matrix.codeql_standard_library_ident }}
129-
path: |
130-
${{ runner.temp }}/test_report_${{ runner.os }}_${{ matrix.codeql_cli }}_${{ matrix.codeql_standard_library_ident }}_slice_*.json
131-
if-no-files-found: error
132-
133-
validate-test-results:
134-
name: Validate test results
135-
needs: [run-test-suites]
136-
runs-on: ubuntu-latest
137-
steps:
138-
139-
- name: Checkout repository
140-
uses: actions/checkout@v6
141-
142-
- name: Install QLT
143-
id: install-qlt
144-
uses: advanced-security/codeql-development-toolkit/.github/actions/install-qlt@main
145-
with:
146-
qlt-version: 'latest'
147-
add-to-path: true
148-
149-
150-
- name: Collect test results
151-
uses: actions/download-artifact@v7
152-
153-
- name: Validate test results
154-
run: |
155-
qlt test run validate-unit-tests --pretty-print --results-directory . >> $GITHUB_STEP_SUMMARY
156-
qlt test run validate-unit-tests --results-directory .
1+
name: QL Unit Tests (Linux)
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
pull_request:
8+
branches:
9+
- 'main'
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
create-unit-test-matrix:
17+
name: Create CodeQL Unit Test Matrix
18+
runs-on: ubuntu-latest
19+
outputs:
20+
matrix: ${{ steps.export-unit-test-matrix.outputs.matrix }}
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v6
24+
25+
- name: Install QLT
26+
id: install-qlt
27+
uses: advanced-security/codeql-development-toolkit/.github/actions/install-qlt@main
28+
with:
29+
qlt-version: 'latest'
30+
add-to-path: true
31+
32+
- name: Export unit test matrix
33+
id: export-unit-test-matrix
34+
run: |
35+
qlt test run get-matrix --os-version ubuntu-latest
36+
37+
run-test-suites:
38+
name: Run Unit Tests
39+
needs: create-unit-test-matrix
40+
41+
runs-on: ${{ matrix.os }}
42+
strategy:
43+
fail-fast: false
44+
matrix: ${{ fromJSON(needs.create-unit-test-matrix.outputs.matrix) }}
45+
46+
steps:
47+
- name: Checkout repository
48+
uses: actions/checkout@v6
49+
50+
- name: Install QLT
51+
id: install-qlt
52+
uses: advanced-security/codeql-development-toolkit/.github/actions/install-qlt@main
53+
with:
54+
qlt-version: 'latest'
55+
add-to-path: true
56+
57+
- name: Install CodeQL
58+
id: install-codeql
59+
shell: bash
60+
run: |
61+
echo "Installing CodeQL"
62+
qlt codeql run install
63+
echo "-----------------------------"
64+
echo "CodeQL Home: $QLT_CODEQL_HOME"
65+
echo "CodeQL Binary: $QLT_CODEQL_PATH"
66+
67+
- name: Verify Versions of Tooling
68+
shell: bash
69+
run: |
70+
echo -e "Checking CodeQL Version:"
71+
$QLT_CODEQL_PATH --version
72+
73+
echo -e "Checking QLT Version:"
74+
echo "QLT Home: ${{ steps.install-qlt.outputs.qlt-home }}"
75+
qlt version
76+
77+
- name: Install QL Packs
78+
shell: bash
79+
run: |
80+
qlt query run install-packs
81+
82+
- name: Setup Node.js for CDS compilation
83+
uses: actions/setup-node@v6
84+
with:
85+
node-version: '20'
86+
cache: 'npm'
87+
cache-dependency-path: 'extractors/cds/tools/package-lock.json'
88+
89+
- name: Verify Node.js and npm tools
90+
run: |
91+
echo "Node.js version: $(node --version)"
92+
echo "npm version: $(npm --version)"
93+
echo "npx version: $(npx --version)"
94+
# Verify npx can access @sap/cds-dk without installing globally
95+
echo "Testing npx access to @sap/cds-dk..."
96+
npx --yes --package @sap/cds-dk@latest cds --version || echo "CDS will be installed per-project as needed"
97+
98+
# Compile .cds files to .cds.json files using the dedicated test script
99+
- name: Compile CAP CDS files
100+
run: |
101+
# Use the dedicated CDS compilation script that includes proper version resolution
102+
# This script follows the same logic as the CDS extractor's resolveCdsVersions function
103+
./extractors/cds/tools/workflow/cds-compilation-for-actions.sh
104+
105+
- name: Run test suites
106+
id: run-test-suites
107+
env:
108+
RUNNER_OS: ${{ runner.os }}
109+
CODEQL_CLI: ${{ matrix.codeql_cli }}
110+
CODEQL_STDLIB: ${{ matrix.codeql_standard_library }}
111+
CODEQL_STDLIB_IDENT: ${{matrix.codeql_standard_library_ident}}
112+
RUNNER_TMP: ${{ runner.temp }}
113+
LGTM_INDEX_XML_MODE: all
114+
LGTM_INDEX_FILETYPES: ".json:JSON\n.cds:JSON"
115+
116+
shell: bash
117+
run: >
118+
qlt test run execute-unit-tests
119+
--codeql-args "--threads=0 --strict-test-discovery"
120+
--num-threads 2
121+
--language javascript
122+
--runner-os $RUNNER_OS
123+
--work-dir $RUNNER_TMP
124+
125+
- name: Upload test results
126+
uses: actions/upload-artifact@v6
127+
with:
128+
name: test-results-${{ runner.os }}-${{ matrix.codeql_cli }}-${{ matrix.codeql_standard_library_ident }}
129+
path: |
130+
${{ runner.temp }}/test_report_${{ runner.os }}_${{ matrix.codeql_cli }}_${{ matrix.codeql_standard_library_ident }}_slice_*.json
131+
if-no-files-found: error
132+
133+
validate-test-results:
134+
name: Validate test results
135+
needs: [run-test-suites]
136+
runs-on: ubuntu-latest
137+
steps:
138+
139+
- name: Checkout repository
140+
uses: actions/checkout@v6
141+
142+
- name: Install QLT
143+
id: install-qlt
144+
uses: advanced-security/codeql-development-toolkit/.github/actions/install-qlt@main
145+
with:
146+
qlt-version: 'latest'
147+
add-to-path: true
148+
149+
150+
- name: Collect test results
151+
uses: actions/download-artifact@v7
152+
153+
- name: Validate test results
154+
run: |
155+
qlt test run validate-unit-tests --pretty-print --results-directory . >> $GITHUB_STEP_SUMMARY
156+
qlt test run validate-unit-tests --results-directory .

0 commit comments

Comments
 (0)