Skip to content

Commit 2c1ecb5

Browse files
committed
fix windows
1 parent 1de6513 commit 2c1ecb5

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

.github/workflows/ql-for-ql-tests.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,28 @@ jobs:
7878
ql/target
7979
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-qltest-cargo-${{ hashFiles('ql/rust-toolchain.toml', 'ql/**/Cargo.lock') }}
8080
- name: Build extractor
81+
if: runner.os != 'Windows'
8182
run: |
8283
cd ql;
8384
codeqlpath=$(dirname ${{ steps.find-codeql.outputs.codeql-path }});
8485
env "PATH=$PATH:$codeqlpath" ./scripts/create-extractor-pack.sh
85-
- name: Run a single QL tests
86+
- name: Build extractor (Windows)
87+
if: runner.os == 'Windows'
88+
shell: pwsh
89+
run: |
90+
cd ql;
91+
$Env:PATH += ";$(dirname ${{ steps.find-codeql.outputs.codeql-path }})"
92+
pwsh ./scripts/create-extractor-pack.ps1
93+
- name: Run a single QL tests - Unix
94+
if: runner.os != 'Windows'
8695
run: |
8796
"${CODEQL}" test run --check-databases --search-path "${{ github.workspace }}/ql/extractor-pack" ql/ql/test/queries/style/DeadCode/DeadCode.qlref
8897
env:
89-
CODEQL: ${{ steps.find-codeql.outputs.codeql-path }}
98+
CODEQL: ${{ steps.find-codeql.outputs.codeql-path }}
99+
- name: Run a single QL tests - Windows
100+
if: runner.os == 'Windows'
101+
shell: pwsh
102+
run: |
103+
$Env:PATH += ";$(dirname ${{ steps.find-codeql.outputs.codeql-path }})"
104+
codeql test run --check-databases --search-path "${{ github.workspace }}/ql/extractor-pack" ql/ql/test/queries/style/DeadCode/DeadCode.qlref
105+

0 commit comments

Comments
 (0)