Skip to content

Commit 4cd8b36

Browse files
committed
ci: fix version, add codeql
1 parent 890f961 commit 4cd8b36

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed

.github/workflows/codeql.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
name: "CodeQL"
3+
4+
on:
5+
push:
6+
pull_request:
7+
schedule:
8+
- cron: "0 19 * * 6"
9+
10+
jobs:
11+
analyze:
12+
name: Analyze
13+
runs-on: ubuntu-latest
14+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
language: ["python"]
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
with:
24+
# We must fetch at least the immediate parents so that if this is
25+
# a pull request then we can checkout the head.
26+
fetch-depth: 10
27+
28+
# If this run was triggered by a pull request event, then checkout
29+
# the head of the pull request instead of the merge commit.
30+
- run: git checkout HEAD^2
31+
if: ${{ github.event_name == 'pull_request' }}
32+
33+
# Initializes the CodeQL tools for scanning.
34+
- name: Initialize CodeQL
35+
uses: github/codeql-action/init@v1
36+
with:
37+
languages: ${{ matrix.language }}
38+
39+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
40+
# If this step fails, then you should remove it and run the build manually (see below)
41+
- name: Autobuild
42+
uses: github/codeql-action/autobuild@v1
43+
44+
# ℹ️ Command-line programs to run using the OS shell.
45+
# 📚 https://git.io/JvXDl
46+
47+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
48+
# and modify them (or add more) to build your code if your project
49+
# uses a compiled language
50+
51+
- name: Perform CodeQL Analysis
52+
uses: github/codeql-action/analyze@v1

.github/workflows/linting.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/setup-python@v5
1515
with:
1616
python-version: 3.x
17-
- uses: pre-commit/action@v3
17+
- uses: pre-commit/action@v3.0.1
1818

1919
hacs:
2020
runs-on: "ubuntu-latest"

0 commit comments

Comments
 (0)