Skip to content

ci: update workflow #31

ci: update workflow

ci: update workflow #31

Workflow file for this run

name: "CodeQL & Pylint"
on:
push:
branches: [ "master" ]
paths:
- ".github/workflows/codeql.yml"
- "api/*.py"
pull_request:
branches: [ "master" ]
jobs:
codeql:
if: github.actor != 'dependabot[bot]' || github.actor != 'github-actions[bot]' || github.actor != 'protected-auto-commits[bot]'
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
include:
- language: python
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: +security-extended
- name: Autobuild
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
output: codeql-report.sarif
- name: Upload CodeQL Results
if: always()
uses: actions/upload-artifact@v4
with:
name: codeql-results
path: codeql-report.sarif
pylint:
name: Pylint
runs-on: ubuntu-latest
needs: codeql
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
cache: "pip"
- name: Cache Dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Pylint Scan & Badge
uses: Silleellie/pylint-github-action@v2
with:
lint-path: |
api
tests
python-version: 3.12
requirements-path: requirements.txt
readme-path: README.md
badge-text: Pylint
color-bad-score: red
color-ok-score: orange
color-good-score: yellow
color-perfect-score: brightgreen