-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (54 loc) · 1.65 KB
/
codeql-analysis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: "CodeQL"
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "0 7 * * 2"
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Cache Poetry installation
uses: actions/cache@v3
with:
path: |
~/.local/bin
~/.poetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Cache Python dependencies
uses: actions/cache@v3
with:
path: |
~/.cache/pypoetry
key: ${{ runner.os }}-python-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-python-
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y build-essential libpq-dev curl
- name: Install Poetry
run: |
type poetry || curl -sSL https://install.python-poetry.org | python3 - --version 1.7.1
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install Python dependencies
run: |
poetry config virtualenvs.create false
poetry install --with dev
playwright install firefox
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: python
setup-python-dependencies: false
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2