Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github-commons/actions/analyze/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ inputs:
sonar-project-key:
description: 'SonarQube project key'
required: true
disable-caching:
description: 'Disable caching'
required: false
default: 'false'

runs:
using: 'composite'
Expand All @@ -20,3 +24,4 @@ runs:
deploy: false
sonar-platform: ${{ inputs.sonarqube-instance }}
scanner-java-opts: '-Xmx1G'
disable-caching: ${{ inputs.disable-caching }}
41 changes: 16 additions & 25 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ on:
- branch-*
- dogfood-*
workflow_dispatch:
pull_request:
schedule:
# Nightly build at 2 AM UTC for shadow analysis
- cron: '0 2 * * *'
- cron: '0 2 * * *'

env:
PYTHON_VERSION: 3.9.5
Expand All @@ -30,20 +31,14 @@ jobs:
matrix:
include:
- name: "Analysis on SonarQube NEXT"
sonar_token_path: "development/kv/data/next"
sonar_host_url: "https://next.sonarqube.com/sonarqube"
sonar_project_key: "org.sonarsource.python:python"
run_condition: "always"
sonarqube-instance: "next"
sonar-project-key: "org.sonarsource.python:python"
- name: "Analysis on Sonarcloud.io"
sonar_token_path: "development/kv/data/sonarcloud"
sonar_host_url: "https://sonarcloud.io"
sonar_project_key: "SonarSource_sonar-python"
run_condition: "nightly"
sonarqube-instance: "sqc-eu"
sonar-project-key: "SonarSource_sonar-python"
- name: "Analysis on SonarQube.us"
sonar_token_path: "development/kv/data/sonarqube-us"
sonar_host_url: "https://sonarqube.us"
sonar_project_key: "SonarSource_sonar-python"
run_condition: "nightly"
sonarqube-instance: "sqc-us"
sonar-project-key: "SonarSource_sonar-python"
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

Expand All @@ -54,25 +49,21 @@ jobs:
git sparse-checkout set stubs/sklearn
git checkout

- name: Get sonar token
id: secrets
uses: SonarSource/vault-action-wrapper@v3
with:
secrets: |
${{ matrix.sonar_token_path }} token | SONAR_TOKEN;

- uses: jdx/mise-action@146a28175021df8ca24f8ee1828cc2a60f980bd5 # v3.5.1
with:
version: 2025.12.12
cache: false
env:
MISE_ENV: test-and-analyze

- name: Remove private directory
run: rm -rf private

- name: Analyze
run: bash ./.cirrus/analyze.sh
env:
SONAR_TOKEN: ${{ fromJson(steps.secrets.outputs.vault).SONAR_TOKEN }}
SONAR_HOST_URL: ${{ matrix.sonar_host_url }}
SONAR_PROJECT_KEY: ${{ matrix.sonar_project_key }}
uses: ./.github-commons/actions/analyze
with:
sonarqube-instance: ${{ matrix.sonarqube-instance }}
sonar-project-key: ${{ matrix.sonar-project-key }}
disable-caching: true


Loading