Skip to content

Commit 74725c4

Browse files
committed
CI: Add CodeQL
1 parent 8521ab2 commit 74725c4

3 files changed

Lines changed: 51 additions & 0 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches: [main, "version-*"]
6+
pull_request:
7+
branches: [main, "version-*"]
8+
schedule:
9+
- cron: "0 0 * * *"
10+
11+
jobs:
12+
analyze:
13+
name: Analyze
14+
runs-on: ubuntu-latest
15+
permissions:
16+
security-events: write
17+
packages: read
18+
actions: read
19+
contents: read
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
include:
25+
- language: actions
26+
build-mode: none
27+
- language: python
28+
build-mode: none
29+
30+
steps:
31+
- name: Checkout repository
32+
uses: actions/checkout@v4
33+
34+
- name: Initialize CodeQL
35+
uses: github/codeql-action/init@v3
36+
with:
37+
languages: ${{ matrix.language }}
38+
build-mode: ${{ matrix.build-mode }}
39+
40+
- name: Perform CodeQL Analysis
41+
uses: github/codeql-action/analyze@v3
42+
with:
43+
category: "/language:${{matrix.language}}"

.github/workflows/publish.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
release:
55
types: [published]
66

7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
711
jobs:
812
pypi-publish:
913
name: Upload release to PyPI

.github/workflows/runrms.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ on:
1414
# Run nightly to check that tests are working with latest dependencies
1515
- cron: "0 0 * * *"
1616

17+
permissions:
18+
contents: read
19+
pull-requests: write
20+
1721
jobs:
1822
check-runrms:
1923
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)