Skip to content

Commit

Permalink
experiment with codeQL
Browse files Browse the repository at this point in the history
  • Loading branch information
kra3 committed May 9, 2021
1 parent 0bd8a80 commit 8b78667
Showing 1 changed file with 28 additions and 18 deletions.
46 changes: 28 additions & 18 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,45 @@ on:
# The branches below must be a subset of the branches above
branches: [ main ]
schedule:
- cron: '1 3 * * */2'
- cron: '1 3 * * 1'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'python' ]
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
python-version: [3.6, 3.7, 3.8, 3.9]

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# setup-python-dependencies: false
# - run: |
# python -m pip install --upgrade pip
# if [ -f requirements.txt ];
# then pip install -r requirements.txt;
# fi
# echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV

- run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ];
then pip install -r requirements.txt;
fi
echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

0 comments on commit 8b78667

Please sign in to comment.