chore(release): v0.3.0 - Verification Context v1.0 + attestation trus… #183
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
| name: SonarCloud | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| jobs: | |
| sonarcloud: | |
| name: SonarCloud | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| steps: | |
| - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
| with: | |
| fetch-depth: 0 # Full history for better analysis relevancy | |
| - name: Set up Python | |
| uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pytest pytest-cov | |
| pip install -e . | |
| - name: Run tests with coverage | |
| run: | | |
| pytest --cov=qwed_infra --cov-report=xml --cov-report=term-missing tests/ | |
| - name: Check Sonar token | |
| if: always() | |
| id: sonar_token_check | |
| env: | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| run: echo "configured=${{ env.SONAR_TOKEN != '' }}" >> "$GITHUB_OUTPUT" | |
| - name: Enforce Sonar token on trusted events | |
| if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository | |
| run: | | |
| test "${{ steps.sonar_token_check.outputs.configured }}" = "true" | |
| - name: SonarCloud Scan | |
| if: always() && steps.sonar_token_check.outputs.configured == 'true' | |
| uses: SonarSource/sonarqube-scan-action@bfd4e558cda28cda6b5defafb9232d191be8c203 # v4.2.1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |