Logic to handle optional_extra in Vision Excel converter input #185
Workflow file for this run
This file contains hidden or 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
| # SPDX-FileCopyrightText: Contributors to the Power Grid Model project <powergridmodel@lfenergy.org> | |
| # | |
| # SPDX-License-Identifier: MPL-2.0 | |
| name: Sonar Cloud | |
| on: | |
| # run pipeline on push event of main branch | |
| push: | |
| branches: | |
| - main | |
| # run pipeline on pull request | |
| pull_request: | |
| # run pipeline on merge queue | |
| merge_group: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }}-sonar | |
| cancel-in-progress: true | |
| jobs: | |
| sonar-cloud: | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - name: Install in develop mode | |
| run: | | |
| pip install -e .[dev] | |
| - name: Test and Coverage | |
| run: | | |
| pytest | |
| # Fix relative paths in coverage file | |
| # Known bug: https://community.sonarsource.com/t/sonar-on-github-actions-with-python-coverage-source-issue/36057 | |
| sed -i 's@/home/runner/work/power-grid-model-io/power-grid-model-io@/github/workspace@g' python_coverage.xml | |
| - name: SonarQube Scan | |
| if: ${{ (github.event_name == 'push') || (github.event.pull_request.head.repo.owner.login == 'PowerGridModel') }} | |
| uses: SonarSource/sonarqube-scan-action@v6 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |