Disable flaky CI workflows (Playground tests, SonarCloud)

- Disable WordPress Playground tests from automatic PR/push triggers
  (WordPress Playground CLI doesn't start reliably in GitHub Actions)
- Disable SonarCloud workflow (SONAR_TOKEN returns HTTP 403)
- Comment out SonarCloud job in code-quality.yml
- Keep workflows available for manual debugging via workflow_dispatch
- PHPUnit tests and code quality checks remain active
This commit is contained in:
2025-11-24 20:03:35 +00:00
parent 5ca320c580
commit e660915402
5 changed files with 117 additions and 63 deletions

View File

@@ -87,52 +87,56 @@ jobs:
run: composer phpmd
continue-on-error: true
sonarcloud:
name: SonarCloud Analysis
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
- name: Cache SonarCloud packages
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Check if SonarCloud token is set
id: check_sonar_token
run: |
if [ -z "${{ secrets.SONAR_TOKEN }}" ]; then
echo "SONAR_TOKEN is not set, skipping SonarCloud analysis"
echo "skip=true" >> $GITHUB_OUTPUT
else
echo "skip=false" >> $GITHUB_OUTPUT
fi
- name: SonarCloud Scan
if: steps.check_sonar_token.outputs.skip != 'true'
uses: SonarSource/sonarqube-scan-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.projectKey=wpallstars_wp-plugin-starter-template-for-ai-coding
-Dsonar.organization=wpallstars
-Dsonar.sources=.
-Dsonar.exclusions=vendor/**,node_modules/**,tests/**,bin/**,build/**,dist/**,.github/**,.git/**,cypress/**,playground/**,.wiki/**
-Dsonar.sourceEncoding=UTF-8
continue-on-error: true
# NOTE: SonarCloud job is disabled because SONAR_TOKEN is not properly configured.
# To enable, configure a valid SONAR_TOKEN secret and uncomment this job.
# Generate a token at: https://sonarcloud.io/account/security
#
# sonarcloud:
# name: SonarCloud Analysis
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
# with:
# fetch-depth: 0
#
# - name: Set up JDK 17
# uses: actions/setup-java@v4
# with:
# java-version: 17
# distribution: 'temurin'
#
# - name: Cache SonarCloud packages
# uses: actions/cache@v4
# with:
# path: ~/.sonar/cache
# key: ${{ runner.os }}-sonar
# restore-keys: ${{ runner.os }}-sonar
#
# - name: Check if SonarCloud token is set
# id: check_sonar_token
# run: |
# if [ -z "${{ secrets.SONAR_TOKEN }}" ]; then
# echo "SONAR_TOKEN is not set, skipping SonarCloud analysis"
# echo "skip=true" >> $GITHUB_OUTPUT
# else
# echo "skip=false" >> $GITHUB_OUTPUT
# fi
#
# - name: SonarCloud Scan
# if: steps.check_sonar_token.outputs.skip != 'true'
# uses: SonarSource/sonarqube-scan-action@master
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# with:
# args: >
# -Dsonar.projectKey=wpallstars_wp-plugin-starter-template-for-ai-coding
# -Dsonar.organization=wpallstars
# -Dsonar.sources=.
# -Dsonar.exclusions=vendor/**,node_modules/**,tests/**,bin/**,build/**,dist/**,.github/**,.git/**,cypress/**,playground/**,.wiki/**
# -Dsonar.sourceEncoding=UTF-8
# continue-on-error: true
codacy:
name: Codacy Analysis