Skip to content

Commit e6745dc

Browse files
committed
JS: Add Action to run tests for ML-powered queries
1 parent 422919b commit e6745dc

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

.github/workflows/js-ml-tests.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: JS ML-powered queries tests
2+
3+
on:
4+
push:
5+
paths:
6+
- "javascript/ql/experimental/adaptivethreatmodeling/**"
7+
- .github/workflows/js-ml-tests.yml
8+
branches:
9+
- main
10+
- "rc/*"
11+
pull_request:
12+
paths:
13+
- "javascript/ql/experimental/adaptivethreatmodeling/**"
14+
- .github/workflows/js-ml-tests.yml
15+
branches:
16+
- main
17+
- "rc/*"
18+
19+
defaults:
20+
run:
21+
working-directory: javascript/ql/experimental/adaptivethreatmodeling
22+
23+
jobs:
24+
qlformat:
25+
name: Check QL formatting
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v2
29+
30+
- uses: ./.github/actions/fetch-codeql
31+
32+
- name: Check QL formatting
33+
run: |
34+
find . "(" -name "*.ql" -or -name "*.qll" ")" -print0 | \
35+
xargs -0 codeql query format --check-only
36+
37+
qlcompile:
38+
name: Check QL compilation
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v2
42+
43+
- uses: ./.github/actions/fetch-codeql
44+
45+
- name: Check QL compilation
46+
run: |
47+
codeql query compile \
48+
--check-only \
49+
--ram 5120 \
50+
--additional-packs "${{ github.workspace }}" \
51+
--threads=0 \
52+
-- \
53+
lib modelbuilding src
54+
55+
qltest:
56+
name: Run QL tests
57+
runs-on: ubuntu-latest
58+
steps:
59+
- uses: actions/checkout@v2
60+
61+
- uses: ./.github/actions/fetch-codeql
62+
63+
- name: Run QL tests
64+
run: |
65+
codeql test run \
66+
--threads=0 \
67+
--ram 5120 \
68+
--additional-packs "${{ github.workspace }}" \
69+
-- \
70+
test

0 commit comments

Comments
 (0)