Skip to content

Commit

Permalink
ci(codeql): add pipenv and install dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
xaviml committed Aug 25, 2021
1 parent a3cb355 commit 99c98cf
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 23 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'python' ]
python_version: [ '3.7', '3.8', '3.9' ]

steps:
- name: Checkout repository
Expand All @@ -30,7 +30,23 @@ jobs:
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
languages: python

# Setup Python (faster than using Python container)
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python_version }}

- name: Install pipenv
run: |
python -m pip install --upgrade pipenv
- name: Install dependencies
run: |
pipenv install --system --deploy --dev
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
with:
setup-python-dependencies: false
40 changes: 19 additions & 21 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
{
"files.autoSave": "afterDelay",
"files.autoSaveDelay": 100,
"python.testing.pytestEnabled": true,
"editor.formatOnSave": true,
"python.formatting.provider": "black",
"python.analysis.typeCheckingMode": "basic",
"python.analysis.diagnosticMode": "workspace",
"python.analysis.stubPath": "apps/controllerx",
"python.testing.pytestArgs": [
"tests"
],
"python.languageServer": "Pylance",
"python.linting.mypyEnabled": true,
"python.linting.mypyCategorySeverity.note": "Error",
"python.linting.flake8Enabled": true,
"[python]": {
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
},
}
"files.autoSave": "afterDelay",
"files.autoSaveDelay": 100,
"python.testing.pytestEnabled": true,
"editor.formatOnSave": true,
"python.formatting.provider": "black",
"python.analysis.typeCheckingMode": "basic",
"python.analysis.diagnosticMode": "workspace",
"python.analysis.stubPath": "apps/controllerx",
"python.testing.pytestArgs": ["tests"],
"python.languageServer": "Pylance",
"python.linting.mypyEnabled": true,
"python.linting.mypyCategorySeverity.note": "Error",
"python.linting.flake8Enabled": true,
"[python]": {
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
}
}

0 comments on commit 99c98cf

Please sign in to comment.