Merge pull request #73 from dskrypa/dependabot/github_actions/codecov… #305
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
# For most projects, this workflow file will not need changing; you simply need | |
# to commit it to your repository. | |
# | |
# You may wish to alter this file to override the set of languages analyzed, | |
# or to provide custom queries or build logic. | |
# | |
name: "CodeQL" | |
permissions: read-all # Declare default permissions as read only. | |
on: | |
push: | |
branches: ["main"] | |
paths-ignore: [ | |
"**/*.rst", "**/*.txt", "**/.flake8", "**/.gitignore", "**/.*rc", "**/*.cfg", "**/*.toml", "lib/cli_command_parser/__version__.py" | |
] | |
pull_request: | |
# The branches below must be a subset of the branches above | |
branches: ["main"] | |
paths-ignore: [ | |
"**/*.rst", "**/*.txt", "**/.flake8", "**/.gitignore", "**/.*rc", "**/*.cfg", "**/*.toml", "lib/cli_command_parser/__version__.py" | |
] | |
schedule: | |
- cron: '29 17 * * 4' | |
jobs: | |
analyze: | |
name: Analyze | |
runs-on: ubuntu-latest | |
permissions: | |
security-events: write | |
strategy: | |
fail-fast: false | |
matrix: | |
language: ["python"] | |
python-version: ["3.12"] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
# Manual definition for this is intended to avoid installing many unnecessary packages | |
# Note: The CODEQL_PYTHON line sets an env var to direct CodeQL to the correct Py interpreter as suggested by: | |
# https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#analyzing-python-dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e .[wcwidth] | |
echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: ${{ matrix.language }} | |
setup-python-dependencies: false | |
# source-root: lib | |
# If you wish to specify custom queries, you can do so here or in a config file. | |
# By default, queries listed here will override any specified in a config file. | |
# Prefix the list here with "+" to use these queries and those in the config file. | |
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs | |
# queries: security-extended,security-and-quality | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 |