Skip to content

Commit 494ec57

Browse files
committed
Add CodeQL to CI suite
1 parent 407a996 commit 494ec57

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,37 @@ jobs:
9696
env:
9797
PATH: $PATH:$(pwd)/bin
9898
- run: codecov
99+
100+
analyze:
101+
name: CodeQL Analyze
102+
needs:
103+
- pytest
104+
runs-on: ubuntu-latest
105+
permissions:
106+
actions: read
107+
contents: read
108+
security-events: write
109+
110+
strategy:
111+
fail-fast: false
112+
matrix:
113+
language: [ javascript, python ]
114+
115+
steps:
116+
- name: Checkout
117+
uses: actions/checkout@v3
118+
119+
- name: Initialize CodeQL
120+
uses: github/codeql-action/init@v2
121+
with:
122+
languages: ${{ matrix.language }}
123+
queries: +security-and-quality
124+
125+
- name: Autobuild
126+
uses: github/codeql-action/autobuild@v2
127+
if: ${{ matrix.language == 'javascript' || matrix.language == 'python' }}
128+
129+
- name: Perform CodeQL Analysis
130+
uses: github/codeql-action/analyze@v2
131+
with:
132+
category: "/language:${{ matrix.language }}"

tests/testapp/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class FileEncoder(DjangoJSONEncoder):
1010
def default(self, o):
1111
if isinstance(o, File):
1212
return o.name
13-
super().default(o)
13+
return super().default(o)
1414

1515

1616
class ExampleFormView(generic.FormView):

0 commit comments

Comments
 (0)