forked from benleb/ad-automoli
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (46 loc) · 1.35 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
name: "CodeQL"
on:
schedule:
- cron: "30 6 * * 1"
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
python_version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.1
- name: Setup Python
uses: actions/setup-python@v4.7.0
with:
python-version: ${{ matrix.python_version }}
- name: Install poetry
uses: snok/install-poetry@v1.3
with:
version: 1.4.0
virtualenvs-create: true
virtualenvs-in-project: true
virtualenvs-path: "{project-dir}/.venv"
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: codeql-venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
run: poetry install
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- 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