Files
deskflow/.github/workflows/codeql-analysis.yml
Nick Bolton c30fbf9002 Use .venv dir for as Python venv and cache (#7485)
* Use .venv as Python venv dir

* Update refs to Python venv dir and use action to cache and setup

* Add missing shell: bash

* Source for Python deps

* Exclude .venv from lint

* Update ChangeLog

* Add cache-key arg for init-python

* Add missing "

* Use workflow specific Python cache names

* Fixed cache key for Linux

* Use bash if to make output clearer in case of skipping.

* Clearer debug output

* Add check for cache key

* Add missing shell

* Add SonarCloud and Valgrind venv cache

* Fixed typo
2024-09-06 13:50:59 +01:00

58 lines
1.3 KiB
YAML

name: "CodeQL Analysis"
on:
workflow_dispatch:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
push:
branches: [master]
jobs:
analyze:
if: ${{ !github.event.pull_request.draft }}
name: Analyze
runs-on: ubuntu-24.04-16-core-x64
container: symless/synergy-core:ubuntu-24.04-amd64
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
language: ["cpp"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Config Git safe dir
run: git config --global --add safe.directory $GITHUB_WORKSPACE
# Should only restore the .venv directory from cache.
- name: Init Python venv
uses: ./.github/actions/init-python
with:
cache-key: "codeql"
setup: false
- name: Install dependencies
run: ./scripts/install_deps.py
env:
# Prevent apt prompting for input.
DEBIAN_FRONTEND: noninteractive
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3