Skip to content

chore(deps): update github/codeql-action action to v4.37.7 (#187) #156

chore(deps): update github/codeql-action action to v4.37.7 (#187)

chore(deps): update github/codeql-action action to v4.37.7 (#187) #156

Workflow file for this run

name: Quality
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
lint:
name: Format and lint Python code
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.12", "3.14" ]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
# Install a specific version of uv.
version: "0.12.3"
enable-cache: true
- name: Install dependencies
run: |
uv sync --all-extras --locked
- name: Check code formatting with black
run: |
uv run --locked python -m black --check .
- name: Check typing with mypy
run: |
uv run --locked python -m mypy --strict .
codeql:
name: CodeQL Analysis
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: [ 'python' ]
permissions:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Initialize CodeQL
uses: github/codeql-action/init@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.37.7
with:
languages: ${{ matrix.language }}
build-mode: none
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.37.7
with:
category: "/language:${{matrix.language}}"
sonarqube:
name: SonarQube Scan
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || !contains(github.event.pull_request.labels.*.name, 'dependencies/renovate') }}
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Read version from file
id: version
run: |
echo "VERSION=$(cat _version.txt | tr -d '\r\n')" >> $GITHUB_OUTPUT
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@22918119ff8e1ca75a623e15c8296b6ea4fbe28f # v8.2.1
with:
args: >
-Dsonar.projectVersion=${{ steps.version.outputs.VERSION }}
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}