Merge pull request #33 from github/aibaars/qltest

Add QL test support
This commit is contained in:
Arthur Baars
2020-11-12 15:10:39 +01:00
committed by GitHub
5 changed files with 49 additions and 0 deletions

6
.codeqlmanifest.json Normal file
View File

@@ -0,0 +1,6 @@
{ "provide": [ "ql/src/qlpack.yml",
"ql/test/qlpack.yml",
"ql/examples/qlpack.yml",
"extractor-pack/codeql-extractor.yml"
]
}

34
.github/workflows/qltest.yml vendored Normal file
View File

@@ -0,0 +1,34 @@
name: Run QL Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
jobs:
qltest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Fetch CodeQL
run: |
gh release download --repo https://github.com/github/codeql-cli-binaries --pattern codeql-linux64.zip
unzip -q codeql-linux64.zip
env:
GITHUB_TOKEN: ${{ github.token }}
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-qltest-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build Extractor
run: env "PATH=$PATH:${{ github.workspace }}/codeql" ./create-extractor-pack.sh
- name: Run QL tests
run: codeql/codeql test run --search-path "${{ github.workspace }}" ql/test

View File

@@ -2,6 +2,7 @@ name: "ruby"
display_name: "Ruby"
version: 0.1
column_kind: "utf8"
legacy_qltest_extraction: true
file_types:
- name: ruby
display_name: Ruby files

5
tools/qltest.cmd Normal file
View File

@@ -0,0 +1,5 @@
@echo off
CALL "%CODEQL_EXTRACTOR_RUBY_ROOT%\tools\autobuild.cmd"
exit /b %ERRORLEVEL%

3
tools/qltest.sh Executable file
View File

@@ -0,0 +1,3 @@
#! /bin/sh
exec "${CODEQL_EXTRACTOR_RUBY_ROOT}/tools/autobuild.sh"