CodeQL #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "CodeQL" | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
schedule: | |
- cron: '0 0 * * 0' | |
jobs: | |
analyze: | |
name: Analyze | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
strategy: | |
matrix: | |
language: [ "cpp" ] # Voeg Python en C++ toe voor analyse | |
# language: [ "python", "cpp" ] # Voeg Python en C++ toe voor analyse | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: ${{ matrix.language }} | |
# Als je een aangepaste CodeQL-database wilt: | |
# db-location: /path/to/custom/database | |
- name: Build project (Python dependencies) | |
if: matrix.language == 'python' | |
run: | | |
pip install -r requirements.txt | |
- name: Build project (ESPHome C++ code) | |
if: matrix.language == 'cpp' | |
run: | | |
esphome compile your_config.yaml | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 |