diff --git a/.github/workflow/java-model-diff.yml b/.github/workflow/java-model-diff.yml new file mode 100644 index 000000000000..ecdf0ac4b83f --- /dev/null +++ b/.github/workflow/java-model-diff.yml @@ -0,0 +1,51 @@ +name: Diff generated Models as Data + +on: + pull_request: + branches: + - main + paths: + - "java/ql/src/utils/model-generator/**/*.*" + +jobs: + model-diff: + runs-on: ubuntu-latest + + steps: + - name: Clone self (github/codeql) for baseline + uses: actions/checkout@v2 + with: + path: codeql-baseline + ref: ${{ github.base_ref }} + - name: Clone self (github/codeql) with new generator + uses: actions/checkout@v2 + with: + path: codeql-current + ref: ${{ github.ref }} + - name: Show setup + run: | + echo "Baseline: ${{ github.base_ref }}" + echo "Current: ${{ github.ref }}" + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Download CodeQL CLI + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release download --repo "github/codeql-cli-binaries" --pattern "codeql-linux64.zip" + - name: Unzip CodeQL CLI + run: unzip -d codeql-cli codeql-linux64.zip + - name: Build modeled package list + run: | + mkdir tmp-models + SLUG="apache/commons-io" + SHORTNAME="commons-io" + projectId=`curl -s https://lgtm.com/api/v1.0/projects/g/$SLUG | jq .id` + curl -L "https://lgtm.com/api/v1.0/snapshots/$projectId/java" -o $SHORTNAME.zip + PATH="$PATH:codeql-cli/codeql" python java/ql/src/utils/model-generator/GenerateFlowModel.py $SHORTNAME.zip tmp-models/$SHORTNAME.qll + git add tmp-models/$SHORTNAME.qll + - name: Show diff + run: | + git diff tmp-models/ diff --git a/ruby/extractor/Cargo.toml b/ruby/extractor/Cargo.toml index efc5a12159d8..3a91da43f86e 100644 --- a/ruby/extractor/Cargo.toml +++ b/ruby/extractor/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] flate2 = "1.0" node-types = { path = "../node-types" } -tree-sitter = "0.19" +tree-sitter = "0.20" tree-sitter-embedded-template = "0.19" tree-sitter-ruby = { git = "https://github.com/tree-sitter/tree-sitter-ruby.git", rev = "bb6a42e42b048627a74a127d3e0184c1eef01de9" } clap = "2.33"