Skip to content

[pre-commit.ci] pre-commit autoupdate #270

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #270

Workflow file for this run

name: CodeQL
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
inputs:
python:
description: Analyze Python code
type: boolean
required: true
javascript:
description: Analyze Javascript code
type: boolean
required: true
jobs:
filter:
uses: ./.github/workflows/filter.yml
with:
filters: |
python: ["**.py"]
javascript: ["**.js"]
analyze:
needs: filter
if: needs.filter.outputs.matches != '[]'
runs-on: ubuntu-latest
strategy:
matrix:
language: ${{ fromJSON(needs.filter.outputs.matches) }}
fail-fast: false
permissions:
security-events: write
steps:
- name: Check out repository
uses: actions/[email protected]
- name: Set up Python 3.10
if: matrix.language == 'python'
uses: actions/[email protected]
with:
python-version: "3.10"
cache: pip
cache-dependency-path: setup.py
- name: Install dependencies
if: matrix.language == 'python'
run: |
python -m pip install .
echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
setup-python-dependencies: false
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{ matrix.language }}"