summaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yml
diff options
context:
space:
mode:
authorMario Campos <mario-campos@github.com>2023-08-28 19:58:46 -0500
committerSébastien Helleu <flashcode@flashtux.org>2024-04-01 18:42:05 +0200
commita7c92e2d2471c1442c65e5ea95a7dce8061f5784 (patch)
tree374530bd724e225e13dcc3f06d344af014e50319 /.github/workflows/ci.yml
parent1fb6fda89b2096c3cf0e4b1986ba40f48969c375 (diff)
downloadweechat-a7c92e2d2471c1442c65e5ea95a7dce8061f5784.zip
ci: add CodeQL code scanning (closes #2102)
Diffstat (limited to '.github/workflows/ci.yml')
-rw-r--r--.github/workflows/ci.yml42
1 files changed, 40 insertions, 2 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 2db9f58c6..60f296b1d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,8 +1,10 @@
name: CI
on:
- - push
- - pull_request
+ push:
+ pull_request:
+ schedule:
+ - cron: '22 9 * * 2'
env:
WEECHAT_DEPENDENCIES: >-
@@ -210,3 +212,39 @@ jobs:
weechat-curses --help
weechat --version
weechat --run-command "/debug dirs;/debug libs" --run-command "/quit"
+
+ codeql-analysis:
+
+ name: CodeQL
+ runs-on: ubuntu-latest
+
+ permissions:
+ actions: read
+ contents: read
+ security-events: write
+
+ steps:
+
+ - name: Checkout repository
+ uses: actions/checkout@v3
+
+ - name: Install dependencies
+ run: |
+ sudo apt-get update -qq
+ sudo apt-get --yes --no-install-recommends install ${{ env.WEECHAT_DEPENDENCIES }}
+ # uninstall php imagick as is causes a crash when loading php plugin (see #2009)
+ sudo apt-get --yes purge php8.1-imagick
+ sudo -H pip3 install --ignore-installed msgcheck
+
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v3
+ with:
+ languages: cpp
+
+ - name: Autobuild
+ uses: github/codeql-action/autobuild@v3
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v3
+ with:
+ category: "/language:cpp"