Skip to content

Commit

Permalink
Showing 201 changed files with 4,320 additions and 446 deletions.
13 changes: 7 additions & 6 deletions .eslintrc.json
@@ -18,15 +18,18 @@
"import/no-amd": "error",
"import/no-commonjs": "error",
"import/no-dynamic-require": "error",
"import/no-extraneous-dependencies": ["error", {"devDependencies": false}],
"import/no-extraneous-dependencies": ["error"],
"import/no-namespace": "off",
"import/no-unresolved": "error",
"import/no-webpack-loader-syntax": "error",
"import/order": ["error", {
"alphabetize": {"order": "asc"},
"newlines-between": "always"
}],
"no-async-foreach/no-async-foreach": "error",
"no-console": "off",
"no-sequences": "error",
"one-var": ["error", "never"],
"sort-imports": ["error", { "allowSeparatedGroups": true }]
"one-var": ["error", "never"]
},
"overrides": [{
// "temporarily downgraded during transition to eslint
@@ -46,9 +49,7 @@
"@typescript-eslint/restrict-template-expressions": "off",
"func-style": "off",
"github/no-then": "off",
"import/no-extraneous-dependencies": "off",
"no-shadow": "off",
"sort-imports": "off"
"no-shadow": "off"
}
}]
}
63 changes: 63 additions & 0 deletions .github/workflows/python-deps.yml
@@ -0,0 +1,63 @@
name: Test Python Package Installation

on:
push:
branches: [main, v1]
pull_request:

jobs:

test-setup-python-scripts:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- test_dir: python-setup/tests/pipenv/requests-2
test_script: $GITHUB_WORKSPACE/python-setup/tests/check_requests_123.sh 2
- test_dir: python-setup/tests/pipenv/requests-3
test_script: $GITHUB_WORKSPACE/python-setup/tests/check_requests_123.sh 3

- test_dir: python-setup/tests/poetry/requests-2
test_script: $GITHUB_WORKSPACE/python-setup/tests/check_requests_123.sh 2
- test_dir: python-setup/tests/poetry/requests-3
test_script: $GITHUB_WORKSPACE/python-setup/tests/check_requests_123.sh 3

- test_dir: python-setup/tests/requirements/requests-2
test_script: $GITHUB_WORKSPACE/python-setup/tests/check_requests_123.sh 2
- test_dir: python-setup/tests/requirements/requests-3
test_script: $GITHUB_WORKSPACE/python-setup/tests/check_requests_123.sh 3

- test_dir: python-setup/tests/setup_py/requests-2
test_script: $GITHUB_WORKSPACE/python-setup/tests/check_requests_123.sh 2
- test_dir: python-setup/tests/setup_py/requests-3
test_script: $GITHUB_WORKSPACE/python-setup/tests/check_requests_123.sh 3

# This one shouldn't fail, but also won't install packages
- test_dir: python-setup/tests/requirements/non-standard-location
test_script: test -z $LGTM_INDEX_IMPORT_PATH

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: python

- name: Test Auto Package Installation
run: |
set -x
$GITHUB_WORKSPACE/python-setup/install_tools.sh
echo -e '\n\n\n\n\n' && sleep 0.5
cd $GITHUB_WORKSPACE/${{ matrix.test_dir }}
find /opt/hostedtoolcache/CodeQL -path "*x64/codeql" -exec $GITHUB_WORKSPACE/python-setup/auto_install_packages.py {} \;
- name: Setup for extractor
run: |
echo $CODEQL_PYTHON
# only run if $CODEQL_PYTHON is set
test ! -z $CODEQL_PYTHON && $GITHUB_WORKSPACE/python-setup/tests/from_python_exe.py $CODEQL_PYTHON || /bin/true
- name: Verify packages installed
run: |
${{ matrix.test_script }}
9 changes: 9 additions & 0 deletions README.md
@@ -22,6 +22,15 @@ on:
push:
pull_request:
schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
# * * * * *
- cron: '0 0 * * 0'

jobs:
4 changes: 4 additions & 0 deletions init/action.yml
@@ -19,6 +19,10 @@ inputs:
queries:
description: Comma-separated list of additional queries to run. By default, this overrides the same setting in a configuration file; prefix with "+" to use both sets of queries.
required: false
setup-python-dependencies:
description: Try to auto-install your python dependencies
required: true
default: 'true'
runs:
using: 'node12'
main: '../lib/init-action.js'
21 changes: 11 additions & 10 deletions lib/actions-util.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/actions-util.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 30 additions & 6 deletions lib/actions-util.test.js
2 changes: 1 addition & 1 deletion lib/actions-util.test.js.map
22 changes: 20 additions & 2 deletions lib/analysis-paths.js
2 changes: 1 addition & 1 deletion lib/analysis-paths.js.map
26 changes: 23 additions & 3 deletions lib/analysis-paths.test.js
2 changes: 1 addition & 1 deletion lib/analysis-paths.test.js.map
2 changes: 1 addition & 1 deletion lib/analyze-action.js
2 changes: 1 addition & 1 deletion lib/analyze-action.js.map
29 changes: 29 additions & 0 deletions lib/analyze.js
2 changes: 1 addition & 1 deletion lib/analyze.js.map
8 changes: 4 additions & 4 deletions lib/analyze.test.js
2 changes: 1 addition & 1 deletion lib/analyze.test.js.map
2 changes: 1 addition & 1 deletion lib/api-client.js
2 changes: 1 addition & 1 deletion lib/api-client.js.map
37 changes: 25 additions & 12 deletions lib/codeql.js
2 changes: 1 addition & 1 deletion lib/codeql.js.map

Large diffs are not rendered by default.

20 changes: 15 additions & 5 deletions lib/codeql.test.js
2 changes: 1 addition & 1 deletion lib/codeql.test.js.map
2 changes: 1 addition & 1 deletion lib/config-utils.js
2 changes: 1 addition & 1 deletion lib/config-utils.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/config-utils.test.js
2 changes: 1 addition & 1 deletion lib/config-utils.test.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/external-queries.js
2 changes: 1 addition & 1 deletion lib/external-queries.js.map
4 changes: 2 additions & 2 deletions lib/external-queries.test.js
2 changes: 1 addition & 1 deletion lib/external-queries.test.js.map
2 changes: 1 addition & 1 deletion lib/fingerprints.js.map
8 changes: 4 additions & 4 deletions lib/fingerprints.test.js

0 comments on commit 28a5b95

Please sign in to comment.