Skip to content

Commit 0428b8e

Browse files
committed
Split Ruby CI into multiple parallel jobs
Run format, compile and db upgrade checks in parallel, along with the main tests, which run in two parallel halves.
1 parent cca74e9 commit 0428b8e

File tree

1 file changed

+25
-7
lines changed

1 file changed

+25
-7
lines changed

.github/workflows/ruby-qltest.yml

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,45 @@ defaults:
2424
working-directory: ruby
2525

2626
jobs:
27-
qltest:
27+
qlformat:
2828
runs-on: ubuntu-latest
2929
steps:
3030
- uses: actions/checkout@v2
3131
- uses: ./.github/actions/fetch-codeql
32-
- uses: ./ruby/actions/create-extractor-pack
33-
- name: Run QL tests
34-
run: |
35-
codeql test run --threads=0 --ram 5000 --search-path "${{ github.workspace }}/ruby/extractor-pack" --check-databases --check-unused-labels --check-repeated-labels --check-redefined-labels --check-use-before-definition --consistency-queries ql/consistency-queries ql/test
36-
env:
37-
GITHUB_TOKEN: ${{ github.token }}
3832
- name: Check QL formatting
3933
run: find ql "(" -name "*.ql" -or -name "*.qll" ")" -print0 | xargs -0 codeql query format --check-only
34+
qlcompile:
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v2
38+
- uses: ./.github/actions/fetch-codeql
4039
- name: Check QL compilation
4140
run: |
4241
codeql query compile --check-only --threads=0 --ram 5000 --warnings=error "ql/src" "ql/examples"
4342
env:
4443
GITHUB_TOKEN: ${{ github.token }}
44+
qlupgrade:
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v2
48+
- uses: ./.github/actions/fetch-codeql
4549
- name: Check DB upgrade scripts
4650
run: |
4751
echo >empty.trap
4852
codeql dataset import -S ql/lib/upgrades/initial/ruby.dbscheme testdb empty.trap
4953
codeql dataset upgrade testdb --additional-packs ql/lib
5054
diff -q testdb/ruby.dbscheme ql/lib/ruby.dbscheme
55+
qltest:
56+
runs-on: ubuntu-latest
57+
strategy:
58+
matrix:
59+
slice: ["1/2", "2/2"]
60+
steps:
61+
- uses: actions/checkout@v2
62+
- uses: ./.github/actions/fetch-codeql
63+
- uses: ./ruby/actions/create-extractor-pack
64+
- name: Run QL tests
65+
run: |
66+
codeql test run --threads=0 --ram 5000 --slice ${{ matrix.slice }} --search-path "${{ github.workspace }}/ruby/extractor-pack" --check-databases --check-unused-labels --check-repeated-labels --check-redefined-labels --check-use-before-definition --consistency-queries ql/consistency-queries ql/test
67+
env:
68+
GITHUB_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)