From 7a40685e59d49ac4c912612b8f7c55b5750b0bd3 Mon Sep 17 00:00:00 2001 From: psadi Date: Tue, 16 Apr 2024 23:01:15 +0530 Subject: [PATCH] ci(workflow): paths ignore for CodeQl --- .github/workflows/ci.yml | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d781554..fd16105 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,10 +3,10 @@ name: Continuous Integration on: workflow_dispatch: {} push: - branches: [ "main" ] + branches: ["main"] pull_request: - types: [opened, synchronize, reopened] - branches: [ "main" ] + types: [opened, synchronize, reopened] + branches: ["main"] jobs: build: @@ -20,7 +20,7 @@ jobs: matrix: python-version: ["3.12"] os: ["ubuntu-latest", "windows-latest", "macos-latest"] - language: [ 'python' ] + language: ["python"] steps: - uses: actions/checkout@v3 with: @@ -46,7 +46,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} with: - args: + args: | -Dsonar.projectKey=psadi_bbcli -Dsonar.organization=psadi -Dsonar.python.version=3 @@ -56,14 +56,27 @@ jobs: -Dsonar.exclusions=tests - name: Initialize CodeQL + if: ${{ matrix.os == 'ubuntu-latest' }} uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} - name: Autobuild + if: ${{ matrix.os == 'ubuntu-latest' }} uses: github/codeql-action/autobuild@v2 - name: Perform CodeQL Analysis + if: ${{ matrix.os == 'ubuntu-latest' }} uses: github/codeql-action/analyze@v2 with: category: "/language:${{matrix.language}}" + paths-ignore: | + __pypackages__ + __pycache__ + .tox + .pdm-build + .ruff_cache + build + dist + .vscode + .github