CodeQL #368
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: [master] | |
paths: | |
- '**.py' | |
- '.github/workflows/codeql*.yml' | |
pull_request: | |
# The branches below must be a subset of the branches above | |
branches: [master] | |
paths: | |
- '**.py' | |
- '.github/workflows/codeql*.yml' | |
schedule: | |
- cron: '0 23 * * 5' | |
concurrency: | |
group: codeql-${{ github.ref }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
analyze: | |
name: CodeQL | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout ${{ github.ref }} | |
uses: actions/checkout@v2 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
- name: Get detailed Python version | |
id: full-python-version | |
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") | |
- name: Python Cache - ${{ matrix.os }}-python-${{ steps.full-python-version.outputs.version }} | |
uses: actions/cache@v2 | |
with: | |
path: ${{ env.pythonLocation }} | |
key: ${{ matrix.os }}-python-${{ steps.full-python-version.outputs.version }} | |
- name: Install Python dependencies | |
run: | | |
python3 -m pip install --upgrade --upgrade-strategy eager pip setuptools wheel babel | |
pip3 install --upgrade --upgrade-strategy eager pillow scipy numpy | |
- name: List environment | |
env: | |
GITHUB_CONTEXT: ${{ toJSON(github) }} | |
JOB_CONTEXT: ${{ toJSON(job) }} | |
STEPS_CONTEXT: ${{ toJSON(steps) }} | |
RUNNER_CONTEXT: ${{ toJSON(runner) }} | |
STRATEGY_CONTEXT: ${{ toJSON(strategy) }} | |
MATRIX_CONTEXT: ${{ toJSON(matrix) }} | |
run: | | |
pip3 list | |
env | |
# Initializes the CodeQL tools for scanning. | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v1 | |
with: | |
languages: python | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v1 |