chore(deps): bump picomatch #741
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
| name: SonarCloud QA Gate | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| sonarcloud: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: package-lock.json | |
| - name: Install dependencies | |
| env: | |
| ELECTRON_SKIP_BINARY_DOWNLOAD: '1' | |
| run: npm ci | |
| - name: Run tests with coverage | |
| run: npm test -- --coverage --runInBand | |
| - name: Ensure coverage report exists | |
| run: | | |
| if [ ! -f coverage/lcov.info ]; then | |
| mkdir -p coverage | |
| touch coverage/lcov.info | |
| fi | |
| - name: Login to Azure (OIDC) | |
| uses: Azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 | |
| with: | |
| client-id: ${{ vars.AZURE_CLIENT_ID }} | |
| tenant-id: ${{ vars.AZURE_TENANT_ID }} | |
| subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }} | |
| - name: Sonar scan (token from Key Vault) | |
| env: | |
| AZURE_KEY_VAULT_NAME: ${{ vars.AZURE_KEY_VAULT_NAME }} | |
| SONAR_SECRET_NAME: ${{ vars.SONAR_TOKEN_SECRET_NAME || 'sonar-cloud-token' }} | |
| SONAR_ORGANIZATION: ${{ vars.SONAR_ORGANIZATION || 'codingworkflow' }} | |
| SONAR_PROJECT_KEY: ${{ vars.SONAR_PROJECT_KEY || 'codingworkflow_ai-code-fusion' }} | |
| run: | | |
| set -euo pipefail | |
| SONAR_TOKEN="$(az keyvault secret show \ | |
| --vault-name "${AZURE_KEY_VAULT_NAME}" \ | |
| --name "${SONAR_SECRET_NAME}" \ | |
| --query value \ | |
| -o tsv)" | |
| test -n "${SONAR_TOKEN}" | |
| echo "::add-mask::${SONAR_TOKEN}" | |
| if ! command -v jq >/dev/null 2>&1; then | |
| echo "jq is required to validate SonarCloud API responses." | |
| exit 1 | |
| fi | |
| auth_header="$(printf '%s:' "${SONAR_TOKEN}" | base64 | tr -d '\n')" | |
| response="$( | |
| curl -sS --fail \ | |
| -H "Authorization: Basic ${auth_header}" \ | |
| -X POST "https://sonarcloud.io/api/autoscan/activation" \ | |
| --data-urlencode "projectKey=${SONAR_PROJECT_KEY}" \ | |
| --data-urlencode "enable=false" | |
| )" | |
| if ! echo "${response}" | jq empty >/dev/null 2>&1; then | |
| echo "Failed to disable SonarCloud Automatic Analysis: response was not valid JSON." | |
| exit 1 | |
| fi | |
| if echo "${response}" | jq -e '.errors | length > 0' >/dev/null 2>&1; then | |
| echo "Failed to disable SonarCloud Automatic Analysis:" | |
| echo "${response}" | jq -r '.errors[]?.msg // empty' | sed 's/^/- /' | |
| exit 1 | |
| fi | |
| npx sonar-scanner \ | |
| -Dsonar.host.url=https://sonarcloud.io \ | |
| -Dsonar.organization="${SONAR_ORGANIZATION}" \ | |
| -Dsonar.projectKey="${SONAR_PROJECT_KEY}" \ | |
| -Dproject.settings=sonar-project.properties \ | |
| -Dsonar.token="${SONAR_TOKEN}" \ | |
| -Dsonar.qualitygate.wait=true \ | |
| -Dsonar.qualitygate.timeout=300 |