From 398e16cdcc4dbafeee8f0ad7c0cc35d966b5fb98 Mon Sep 17 00:00:00 2001 From: Slaven Kopic Date: Thu, 19 Feb 2026 09:32:25 +0100 Subject: [PATCH 1/2] backport sonar --- .../fe/fe-check-upmerge.yml | 6 +- .../fe/fe-cleanup-snapshots.yml | 6 +- .github/workflow-templates/fe/fe-licenses.yml | 6 +- .github/workflow-templates/fe/fe-main.yml | 6 +- .github/workflow-templates/fe/fe-pr-close.yml | 6 +- .../workflow-templates/fe/fe-pr-snapshot.yml | 6 +- .github/workflow-templates/fe/fe-pr.yml | 6 +- .github/workflow-templates/fe/fe-release.yml | 6 +- .../workflow-templates/fe/fe-tag-pushed.yml | 6 +- .github/workflows/fe-code-quality.yml | 138 +++++++++++++++++- .github/workflows/fe-sonar.yml | 116 +++++++++++++++ tools/scripts/run-many/affected-projects.ts | 6 +- tools/scripts/run-many/run-many.ts | 41 +++++- 13 files changed, 337 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/fe-sonar.yml diff --git a/.github/workflow-templates/fe/fe-check-upmerge.yml b/.github/workflow-templates/fe/fe-check-upmerge.yml index 7205beeb..363989a3 100644 --- a/.github/workflow-templates/fe/fe-check-upmerge.yml +++ b/.github/workflow-templates/fe/fe-check-upmerge.yml @@ -4,7 +4,11 @@ on: # Runs "At 18:00 every day" (see https://crontab.guru) - cron: '0 18 * * *' -permissions: write-all +permissions: + contents: write + pull-requests: write + actions: read + checks: write jobs: check-upmerge: diff --git a/.github/workflow-templates/fe/fe-cleanup-snapshots.yml b/.github/workflow-templates/fe/fe-cleanup-snapshots.yml index c49e3025..cedfa48d 100644 --- a/.github/workflow-templates/fe/fe-cleanup-snapshots.yml +++ b/.github/workflow-templates/fe/fe-cleanup-snapshots.yml @@ -4,7 +4,11 @@ on: # Runs "At 00:00 on day-of-month 28 in every 3rd month." (see https://crontab.guru) - cron: '0 0 28 */3 *' -permissions: write-all +permissions: + contents: write + pull-requests: write + actions: read + checks: write jobs: cleanup-snapshots: diff --git a/.github/workflow-templates/fe/fe-licenses.yml b/.github/workflow-templates/fe/fe-licenses.yml index c339b5e2..d944045f 100644 --- a/.github/workflow-templates/fe/fe-licenses.yml +++ b/.github/workflow-templates/fe/fe-licenses.yml @@ -5,7 +5,11 @@ on: - 'package.json' - 'package-lock.json' -permissions: write-all +permissions: + contents: write + pull-requests: write + actions: read + checks: write env: NX_BRANCH: ${{ github.event.number }} diff --git a/.github/workflow-templates/fe/fe-main.yml b/.github/workflow-templates/fe/fe-main.yml index deada3bd..f9ef5a43 100644 --- a/.github/workflow-templates/fe/fe-main.yml +++ b/.github/workflow-templates/fe/fe-main.yml @@ -5,7 +5,11 @@ on: - main - master -permissions: write-all +permissions: + contents: write + pull-requests: write + actions: read + checks: write env: NX_BRANCH: ${{ github.event.number }} diff --git a/.github/workflow-templates/fe/fe-pr-close.yml b/.github/workflow-templates/fe/fe-pr-close.yml index 1d734271..a0f1f3a7 100644 --- a/.github/workflow-templates/fe/fe-pr-close.yml +++ b/.github/workflow-templates/fe/fe-pr-close.yml @@ -5,7 +5,11 @@ on: branches: - '**' -permissions: write-all +permissions: + contents: write + pull-requests: write + actions: read + checks: write jobs: remove-artifacts: diff --git a/.github/workflow-templates/fe/fe-pr-snapshot.yml b/.github/workflow-templates/fe/fe-pr-snapshot.yml index d22ae826..600ab523 100644 --- a/.github/workflow-templates/fe/fe-pr-snapshot.yml +++ b/.github/workflow-templates/fe/fe-pr-snapshot.yml @@ -5,7 +5,11 @@ on: branches: - '**' -permissions: write-all +permissions: + contents: write + pull-requests: write + actions: read + checks: write jobs: publish-pr-snapshot: diff --git a/.github/workflow-templates/fe/fe-pr.yml b/.github/workflow-templates/fe/fe-pr.yml index 21c28b23..eec96c7a 100644 --- a/.github/workflow-templates/fe/fe-pr.yml +++ b/.github/workflow-templates/fe/fe-pr.yml @@ -4,7 +4,11 @@ on: branches: - '**' -permissions: write-all +permissions: + contents: write + pull-requests: write + actions: read + checks: write env: NX_BRANCH: ${{ github.event.number }} diff --git a/.github/workflow-templates/fe/fe-release.yml b/.github/workflow-templates/fe/fe-release.yml index 1beaa86a..ad000373 100644 --- a/.github/workflow-templates/fe/fe-release.yml +++ b/.github/workflow-templates/fe/fe-release.yml @@ -4,7 +4,11 @@ on: branches: - 'release/*' -permissions: write-all +permissions: + contents: write + pull-requests: write + actions: read + checks: write env: NX_BRANCH: ${{ github.event.number }} diff --git a/.github/workflow-templates/fe/fe-tag-pushed.yml b/.github/workflow-templates/fe/fe-tag-pushed.yml index 4f2608d8..861f8807 100644 --- a/.github/workflow-templates/fe/fe-tag-pushed.yml +++ b/.github/workflow-templates/fe/fe-tag-pushed.yml @@ -4,7 +4,11 @@ on: tags: - '*/*' -permissions: write-all +permissions: + contents: write + pull-requests: write + actions: read + checks: write env: NX_BRANCH: ${{ github.event.number }} diff --git a/.github/workflows/fe-code-quality.yml b/.github/workflows/fe-code-quality.yml index 7d573a45..617b2858 100644 --- a/.github/workflows/fe-code-quality.yml +++ b/.github/workflows/fe-code-quality.yml @@ -1,6 +1,26 @@ name: Frontend Code Quality Workflow -on: workflow_call +on: + workflow_call: + secrets: + SONAR_CLOUD_TOKEN: + required: false + inputs: + SONAR_CLOUD_ORG: + required: false + description: "SonarCloud organization key, e.g., 'my-org'" + type: string + default: "collaborationfactory" + SONAR_CLOUD_PROJECT_KEY: + required: false + description: "SonarCloud project key, e.g., 'my-project'" + type: string + default: "" + SONAR_PROPERTIES: + required: false + description: "Additional sonar-project.properties content" + type: string + default: "" jobs: code-quality: @@ -9,15 +29,17 @@ jobs: matrix: target: [ 'test' ] jobIndex: [ 1, 2, 3,4 ] + fail-fast: false # Continue running all matrix combinations even if one fails env: jobCount: 4 + coverageEnabled: ${{ secrets.SONAR_CLOUD_TOKEN != '' }} steps: - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.ref }} fetch-depth: 0 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 18.19.1 - name: Cache Node Modules @@ -33,11 +55,123 @@ jobs: - name: Linter run: npx nx affected --target=lint --parallel --configuration=dev --base=origin/${{ github.event.pull_request.base.ref }} + - name: Fetch base branch + run: git fetch origin ${{ github.event.pull_request.base.ref }}:${{ github.event.pull_request.base.ref }} || true + - name: Unit Tests + id: test uses: collaborationFactory/github-actions/.github/actions/run-many@release/25.2 + continue-on-error: true with: target: ${{ matrix.target }} jobIndex: ${{ matrix.jobIndex }} jobCount: ${{ env.jobCount }} base: ${{ github.event.pull_request.base.ref }} ref: ${{ github.event.pull_request.head.ref }} + + - name: Upload Coverage Reports + if: ${{ env.coverageEnabled == 'true' }} + uses: actions/upload-artifact@v4 + with: + name: coverage-${{ matrix.jobIndex }} + path: coverage/ + retention-days: 7 + + - name: Fail pipeline if test step failed + run: | + if [ "${{ steps.test.outcome }}" = "failure" ]; then + echo "Unit tests step failed, failing the pipeline." + exit 1 + fi + + check-sonar: + name: Check SonarCloud Configuration + runs-on: ubuntu-latest + outputs: + has_token: ${{ steps.check.outputs.has_token }} + steps: + - name: Check if SONAR_CLOUD_TOKEN exists + id: check + run: | + if [ -n "${{ secrets.SONAR_CLOUD_TOKEN }}" ]; then + echo "has_token=true" >> $GITHUB_OUTPUT + echo "SonarCloud token is configured" + else + echo "has_token=false" >> $GITHUB_OUTPUT + echo "SonarCloud token is not configured, skipping SonarCloud analysis" + fi + + sonar: + name: SonarCloud + needs: [code-quality, check-sonar] + if: needs.check-sonar.outputs.has_token == 'true' + runs-on: ubuntu-latest + steps: + - name: Set SonarCloud Project Key + id: set-project-key + run: | + if [ -z "${{ inputs.SONAR_CLOUD_PROJECT_KEY }}" ]; then + echo "project_key=collaborationFactory_${{ github.event.repository.name }}" >> $GITHUB_OUTPUT + else + echo "project_key=${{ inputs.SONAR_CLOUD_PROJECT_KEY }}" >> $GITHUB_OUTPUT + fi + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Write sonar-project.properties + run: | + echo "sonar.host.url=https://sonarcloud.io" > sonar-project.properties + echo "sonar.organization=${{ inputs.SONAR_CLOUD_ORG }}" >> sonar-project.properties + echo "sonar.projectKey=${{ steps.set-project-key.outputs.project_key }}" >> sonar-project.properties + echo "sonar.test.inclusions=**/*.spec.ts,**/*.test.ts,**/*.spec.tsx,**/*.test.tsx" >> sonar-project.properties + echo "sonar.javascript.lcov.reportPaths=./coverage/lcov.info" >> sonar-project.properties + if [ -n "${{ inputs.SONAR_PROPERTIES }}" ]; then + echo "${{ inputs.SONAR_PROPERTIES }}" >> sonar-project.properties + fi + cat sonar-project.properties + + - name: download coverage report + uses: actions/download-artifact@v4 + with: + path: ./coverage + pattern: coverage-* + merge-multiple: true + + - name: Check for LCOV files + id: check-lcov + run: | + if find ./coverage -name "lcov*.info" -type f | grep -q .; then + echo "lcov_exists=true" >> $GITHUB_OUTPUT + echo "LCOV files found, will proceed with merge" + else + echo "lcov_exists=false" >> $GITHUB_OUTPUT + echo "No LCOV files found, skipping merge" + fi + + - name: Merge matrix coverage reports + if: steps.check-lcov.outputs.lcov_exists == 'true' + run: | + echo "=== Finding all LCOV files ===" + find ./coverage -name "lcov*.info" -type f + echo "" + echo "=== Merging coverage files ===" + npx lcov-result-merger "coverage/**/lcov*.info" coverage/lcov.info + echo "" + echo "=== Merge completed ===" + ls -lh ./coverage/lcov.info + + - name: Normalize LCOV paths for Linux + if: steps.check-lcov.outputs.lcov_exists == 'true' + run: | + if [ -f "./coverage/lcov.info" ]; then + sed -i 's|\\|/|g' ./coverage/lcov.info + echo "Normalized LCOV paths to Unix format" + fi + + - name: SonarQube Scan + uses: SonarSource/sonarqube-scan-action@v6 + env: + SONAR_TOKEN: ${{ secrets.SONAR_CLOUD_TOKEN }} diff --git a/.github/workflows/fe-sonar.yml b/.github/workflows/fe-sonar.yml new file mode 100644 index 00000000..5a9f816e --- /dev/null +++ b/.github/workflows/fe-sonar.yml @@ -0,0 +1,116 @@ +name: Frontend SonarQube Scan +# Only run the workflow for master/main and release branches + +on: + workflow_call: + secrets: + SONAR_CLOUD_TOKEN: + required: true + description: "SonarCloud authentication token" + inputs: + SONAR_CLOUD_ORG: + required: false + description: "SonarCloud organization key, e.g., 'my-org'" + type: string + default: "collaborationfactory" + SONAR_PROPERTIES: + required: false + description: "Additional sonar-project.properties content" + type: string + default: "" + +jobs: + sonarqube-scan: + name: SonarQube Code Quality Scan + runs-on: ubuntu-latest + # Only run the workflow for master/main and release branches + if: github.ref_name == 'master' || github.ref_name == 'main' || startsWith(github.ref_name, 'release/') + permissions: + contents: read + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Full history for SonarQube analysis + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 18.19.1 + + - name: Cache Node Modules + id: npm-cache + uses: actions/cache@v4 + with: + path: '**/node_modules' + key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} + + - name: Install dependencies + if: steps.npm-cache.outputs.cache-hit != 'true' + run: npm ci + + - name: Run Formatter Check + run: npx nx format:check + + - name: Run Linter + run: npx nx run-many --target=lint --all --parallel --configuration=dev + + - name: Run Unit Tests with Coverage + run: npx nx run-many --target=test --all --parallel --coverage --codeCoverage=true --coverageReporters=lcov --coverageReporters=html + continue-on-error: false + + - name: Check for LCOV files + id: check-lcov + run: | + if find ./coverage -name "lcov*.info" -type f 2>/dev/null | grep -q .; then + echo "lcov_exists=true" >> $GITHUB_OUTPUT + echo "LCOV files found" + else + echo "lcov_exists=false" >> $GITHUB_OUTPUT + echo "No LCOV files found, will proceed without coverage" + fi + + - name: Merge coverage reports + if: steps.check-lcov.outputs.lcov_exists == 'true' + run: | + echo "=== Finding all LCOV files ===" + find ./coverage -name "lcov*.info" -type f + echo "" + echo "=== Merging coverage files ===" + npx lcov-result-merger "coverage/**/lcov*.info" coverage/lcov.info + echo "" + echo "=== Merge completed ===" + ls -lh ./coverage/lcov.info || echo "Merge failed or no output file" + + - name: Normalize LCOV paths + if: steps.check-lcov.outputs.lcov_exists == 'true' + run: | + if [ -f "./coverage/lcov.info" ]; then + sed -i 's|\\|/|g' ./coverage/lcov.info + echo "Normalized LCOV paths to Unix format" + else + echo "Warning: coverage/lcov.info not found" + fi + + - name: Write sonar-project.properties + run: | + echo "sonar.host.url=https://sonarcloud.io" > sonar-project.properties + echo "sonar.organization=${{ inputs.SONAR_CLOUD_ORG || 'collaborationfactory' }}" >> sonar-project.properties + echo "sonar.projectKey=collaborationFactory_${{ github.event.repository.name }}" >> sonar-project.properties + echo "sonar.test.inclusions=**/*.spec.ts,**/*.test.ts,**/*.spec.tsx,**/*.test.tsx" >> sonar-project.properties + echo "sonar.branch.name=${{ github.ref_name }}" >> sonar-project.properties + echo "sonar.projectVersion=${{ github.ref_name }}" >> sonar-project.properties + echo "sonar.qualitygate.wait=true" >> sonar-project.properties + if [ -f "./coverage/lcov.info" ]; then + echo "sonar.javascript.lcov.reportPaths=./coverage/lcov.info" >> sonar-project.properties + fi + if [ -n "${{ inputs.SONAR_PROPERTIES }}" ]; then + echo "${{ inputs.SONAR_PROPERTIES }}" >> sonar-project.properties + fi + echo "=== SonarQube Configuration ===" + cat sonar-project.properties + + - name: SonarQube Scan + uses: SonarSource/sonarqube-scan-action@v6 + env: + SONAR_TOKEN: ${{ secrets.SONAR_CLOUD_TOKEN }} diff --git a/tools/scripts/run-many/affected-projects.ts b/tools/scripts/run-many/affected-projects.ts index 58e1d747..5464b298 100644 --- a/tools/scripts/run-many/affected-projects.ts +++ b/tools/scripts/run-many/affected-projects.ts @@ -6,7 +6,9 @@ export function distributeProjectsEvenly( ): string[][] { const sortedProjects = [...allProjects].sort((a, b) => a.localeCompare(b)); - const distributedProjects: string[][] = Array(jobCount).fill([]).map(() => []); + const distributedProjects: string[][] = Array(jobCount) + .fill([]) + .map(() => []); sortedProjects.forEach((project, index) => { const jobIndex = index % jobCount; distributedProjects[jobIndex].push(project); @@ -23,7 +25,7 @@ export function getAffectedProjects( ref: string ) { let allAffectedProjects = []; - if (target === 'e2e' && ref === '') { + if (ref === '') { allAffectedProjects = Utils.getAllProjects(false, null, target); } else { allAffectedProjects = Utils.getAllProjects(true, base, target); diff --git a/tools/scripts/run-many/run-many.ts b/tools/scripts/run-many/run-many.ts index 08524a5f..386b7b9b 100644 --- a/tools/scripts/run-many/run-many.ts +++ b/tools/scripts/run-many/run-many.ts @@ -7,12 +7,31 @@ function getE2ECommand(command: string, base: string): string { return command; } +function getCoverageCommand(command: string): string { + const coverageEnabled = process.env.coverageEnabled === 'true'; + core.info(`Coverage enabled: ${coverageEnabled}`); + if(coverageEnabled) { + command = command.concat( + ` --codeCoverage=true --coverageReporters=lcov --coverageReporters=html` + ); + } + return command; +} + function runCommand(command: string): void { + if (command.includes('--targets=e2e')) { + const commandArr = command.split(' '); + command = commandArr.filter((c) => !c.includes('--base=')).join(' '); + } core.info(`Running > ${command}`); try { - const output = execSync(command, { stdio: 'pipe', maxBuffer: 1024 * 1024 * 1024, encoding: 'utf-8' }); // 10MB - core.info(output.toString()) + const output = execSync(command, { + stdio: 'pipe', + maxBuffer: 1024 * 1024 * 1024, + encoding: 'utf-8', + }); // 10MB + core.info(output.toString()); } catch (error) { if (error.signal === 'SIGTERM') { core.error('Timed out'); @@ -36,12 +55,16 @@ function main() { // in case base is not a SHA1 commit hash add origin if (!/\b[0-9a-f]{5,40}\b/.test(base)) base = 'origin/' + base; - if(base.includes('0000000000000000')){ - base = execSync(`git rev-parse --abbrev-ref origin/HEAD `).toString().trim(); + if (base.includes('0000000000000000')) { + base = execSync(`git rev-parse --abbrev-ref origin/HEAD `) + .toString() + .trim(); } const ref = process.argv[6]; - core.info(`Inputs:\n target ${target},\n jobIndex: ${jobIndex},\n jobCount ${jobCount},\n base ${base},\n ref ${ref}`) + core.info( + `Inputs:\n target ${target},\n jobIndex: ${jobIndex},\n jobCount ${jobCount},\n base ${base},\n ref ${ref}` + ); const projects = getAffectedProjects(target, jobIndex, jobCount, base, ref); @@ -52,6 +75,14 @@ function main() { cmd = getE2ECommand(cmd, base); } + // Add coverage flag if enabled and target is test + if (target === 'test') { + core.info('Coverage gate is enabled'); + // Add coverage reporters for HTML, JSON, and JUnit output + // Note: Using individual project coverage directories + cmd = getCoverageCommand(cmd); + } + if (projects.length > 0) { runCommand(cmd); } else { From dfee34f0b57655291104a94e1574af2a2a2fe4c1 Mon Sep 17 00:00:00 2001 From: Slaven Kopic Date: Thu, 19 Feb 2026 09:34:25 +0100 Subject: [PATCH 2/2] test branches --- .github/workflow-templates/fe/fe-check-upmerge.yml | 2 +- .github/workflow-templates/fe/fe-cleanup-snapshots.yml | 2 +- .github/workflow-templates/fe/fe-licenses.yml | 2 +- .github/workflow-templates/fe/fe-main.yml | 8 ++++---- .github/workflow-templates/fe/fe-pr-close.yml | 2 +- .github/workflow-templates/fe/fe-pr-snapshot.yml | 2 +- .github/workflow-templates/fe/fe-pr.yml | 8 ++++---- .github/workflow-templates/fe/fe-release.yml | 8 ++++---- .github/workflow-templates/fe/fe-tag-pushed.yml | 2 +- .github/workflows/fe-build.yml | 2 +- .github/workflows/fe-check-upmerge.yml | 2 +- .github/workflows/fe-cleanup-snapshots.yml | 2 +- .github/workflows/fe-code-quality.yml | 2 +- .github/workflows/fe-e2e.yml | 2 +- .github/workflows/fe-pr-close.yml | 2 +- .github/workflows/fe-pr-snapshot.yml | 2 +- .github/workflows/fe-release.yml | 2 +- .github/workflows/fe-snapshot.yml | 2 +- .github/workflows/fe-tag.yml | 2 +- 19 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/workflow-templates/fe/fe-check-upmerge.yml b/.github/workflow-templates/fe/fe-check-upmerge.yml index 363989a3..49053943 100644 --- a/.github/workflow-templates/fe/fe-check-upmerge.yml +++ b/.github/workflow-templates/fe/fe-check-upmerge.yml @@ -12,7 +12,7 @@ permissions: jobs: check-upmerge: - uses: collaborationFactory/github-actions/.github/workflows/fe-check-upmerge.yml@release/25.2 + uses: collaborationFactory/github-actions/.github/workflows/fe-check-upmerge.yml@feature/PFM-TASK-7338-Backport-Sonar-Scan-in-github-actions secrets: SLACK_TOKEN_UPMERGE: ${{ secrets.SLACK_TOKEN_UPMERGE }} GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }} diff --git a/.github/workflow-templates/fe/fe-cleanup-snapshots.yml b/.github/workflow-templates/fe/fe-cleanup-snapshots.yml index cedfa48d..b9c4025b 100644 --- a/.github/workflow-templates/fe/fe-cleanup-snapshots.yml +++ b/.github/workflow-templates/fe/fe-cleanup-snapshots.yml @@ -12,7 +12,7 @@ permissions: jobs: cleanup-snapshots: - uses: collaborationFactory/github-actions/.github/workflows/fe-cleanup-snapshots.yml@release/25.2 + uses: collaborationFactory/github-actions/.github/workflows/fe-cleanup-snapshots.yml@feature/PFM-TASK-7338-Backport-Sonar-Scan-in-github-actions secrets: JFROG_BASE64_TOKEN: ${{ secrets.JFROG_BASE64_TOKEN }} JFROG_URL: ${{ secrets.JFROG_URL }} diff --git a/.github/workflow-templates/fe/fe-licenses.yml b/.github/workflow-templates/fe/fe-licenses.yml index d944045f..d1ceca47 100644 --- a/.github/workflow-templates/fe/fe-licenses.yml +++ b/.github/workflow-templates/fe/fe-licenses.yml @@ -17,7 +17,7 @@ env: jobs: check-licenses: - uses: collaborationFactory/github-actions/.github/workflows/fe-licenses.yml@release/25.2 + uses: collaborationFactory/github-actions/.github/workflows/fe-licenses.yml@feature/PFM-TASK-7338-Backport-Sonar-Scan-in-github-actions with: FOSS_DIST: dist CUSTOM_LICENSES_JSON: custom-licenses/custom-licenses.json diff --git a/.github/workflow-templates/fe/fe-main.yml b/.github/workflow-templates/fe/fe-main.yml index f9ef5a43..b6bb2d92 100644 --- a/.github/workflow-templates/fe/fe-main.yml +++ b/.github/workflow-templates/fe/fe-main.yml @@ -17,7 +17,7 @@ env: jobs: install-deps: - uses: collaborationFactory/github-actions/.github/workflows/fe-install-deps.yml@release/25.2 + uses: collaborationFactory/github-actions/.github/workflows/fe-install-deps.yml@feature/PFM-TASK-7338-Backport-Sonar-Scan-in-github-actions with: GHA_REF: '' secrets: @@ -26,7 +26,7 @@ jobs: # This job is only needed in case you are using Percy e2e-tests: needs: install-deps - uses: collaborationFactory/github-actions/.github/workflows/fe-e2e.yml@release/25.2 + uses: collaborationFactory/github-actions/.github/workflows/fe-e2e.yml@feature/PFM-TASK-7338-Backport-Sonar-Scan-in-github-actions with: GHA_REF: '' GHA_BASE: ${{ github.event.before }} @@ -35,14 +35,14 @@ jobs: build: needs: install-deps - uses: collaborationFactory/github-actions/.github/workflows/fe-build.yml@release/25.2 + uses: collaborationFactory/github-actions/.github/workflows/fe-build.yml@feature/PFM-TASK-7338-Backport-Sonar-Scan-in-github-actions with: GHA_REF: '' GHA_BASE: ${{ github.event.before }} snapshot: needs: build - uses: collaborationFactory/github-actions/.github/workflows/fe-snapshot.yml@release/25.2 + uses: collaborationFactory/github-actions/.github/workflows/fe-snapshot.yml@feature/PFM-TASK-7338-Backport-Sonar-Scan-in-github-actions with: GHA_REF: '' GHA_BASE: ${{ github.event.before }} diff --git a/.github/workflow-templates/fe/fe-pr-close.yml b/.github/workflow-templates/fe/fe-pr-close.yml index a0f1f3a7..092d4549 100644 --- a/.github/workflow-templates/fe/fe-pr-close.yml +++ b/.github/workflow-templates/fe/fe-pr-close.yml @@ -13,7 +13,7 @@ permissions: jobs: remove-artifacts: - uses: collaborationFactory/github-actions/.github/workflows/fe-pr-close.yml@release/25.2 + uses: collaborationFactory/github-actions/.github/workflows/fe-pr-close.yml@feature/PFM-TASK-7338-Backport-Sonar-Scan-in-github-actions with: GHA_BASE: ${{ github.event.pull_request.base.ref }} secrets: diff --git a/.github/workflow-templates/fe/fe-pr-snapshot.yml b/.github/workflow-templates/fe/fe-pr-snapshot.yml index 600ab523..63436d13 100644 --- a/.github/workflow-templates/fe/fe-pr-snapshot.yml +++ b/.github/workflow-templates/fe/fe-pr-snapshot.yml @@ -13,7 +13,7 @@ permissions: jobs: publish-pr-snapshot: - uses: collaborationFactory/github-actions/.github/workflows/fe-pr-snapshot.yml@release/25.2 + uses: collaborationFactory/github-actions/.github/workflows/fe-pr-snapshot.yml@feature/PFM-TASK-7338-Backport-Sonar-Scan-in-github-actions with: GHA_BASE: ${{ github.event.pull_request.base.ref }} secrets: diff --git a/.github/workflow-templates/fe/fe-pr.yml b/.github/workflow-templates/fe/fe-pr.yml index eec96c7a..17f59c1e 100644 --- a/.github/workflow-templates/fe/fe-pr.yml +++ b/.github/workflow-templates/fe/fe-pr.yml @@ -16,7 +16,7 @@ env: jobs: install-deps: - uses: collaborationFactory/github-actions/.github/workflows/fe-install-deps.yml@release/25.2 + uses: collaborationFactory/github-actions/.github/workflows/fe-install-deps.yml@feature/PFM-TASK-7338-Backport-Sonar-Scan-in-github-actions with: GHA_REF: ${{ github.event.pull_request.head.ref }} secrets: @@ -24,20 +24,20 @@ jobs: build: needs: install-deps - uses: collaborationFactory/github-actions/.github/workflows/fe-build.yml@release/25.2 + uses: collaborationFactory/github-actions/.github/workflows/fe-build.yml@feature/PFM-TASK-7338-Backport-Sonar-Scan-in-github-actions with: GHA_REF: ${{ github.event.pull_request.head.ref }} GHA_BASE: ${{ github.event.pull_request.base.ref }} code-quality: needs: install-deps - uses: collaborationFactory/github-actions/.github/workflows/fe-code-quality.yml@release/25.2 + uses: collaborationFactory/github-actions/.github/workflows/fe-code-quality.yml@feature/PFM-TASK-7338-Backport-Sonar-Scan-in-github-actions with: GHA_REF: ${{ github.event.pull_request.head.ref }} GHA_BASE: ${{ github.event.pull_request.base.ref }} e2e: needs: install-deps - uses: collaborationFactory/github-actions/.github/workflows/fe-e2e.yml@release/25.2 + uses: collaborationFactory/github-actions/.github/workflows/fe-e2e.yml@feature/PFM-TASK-7338-Backport-Sonar-Scan-in-github-actions with: GHA_REF: ${{ github.event.pull_request.head.ref }} GHA_BASE: ${{ github.event.pull_request.base.ref }} diff --git a/.github/workflow-templates/fe/fe-release.yml b/.github/workflow-templates/fe/fe-release.yml index ad000373..452b6489 100644 --- a/.github/workflow-templates/fe/fe-release.yml +++ b/.github/workflow-templates/fe/fe-release.yml @@ -16,7 +16,7 @@ env: jobs: install-deps: - uses: collaborationFactory/github-actions/.github/workflows/fe-install-deps.yml@release/25.2 + uses: collaborationFactory/github-actions/.github/workflows/fe-install-deps.yml@feature/PFM-TASK-7338-Backport-Sonar-Scan-in-github-actions with: GHA_REF: '' secrets: @@ -24,7 +24,7 @@ jobs: e2e-tests: needs: install-deps - uses: collaborationFactory/github-actions/.github/workflows/fe-e2e.yml@release/25.2 + uses: collaborationFactory/github-actions/.github/workflows/fe-e2e.yml@feature/PFM-TASK-7338-Backport-Sonar-Scan-in-github-actions with: GHA_REF: '' GHA_BASE: ${{ github.event.before }} @@ -33,14 +33,14 @@ jobs: build: needs: install-deps - uses: collaborationFactory/github-actions/.github/workflows/fe-build.yml@release/25.2 + uses: collaborationFactory/github-actions/.github/workflows/fe-build.yml@feature/PFM-TASK-7338-Backport-Sonar-Scan-in-github-actions with: GHA_REF: '' GHA_BASE: ${{ github.event.before }} tag: needs: [build, e2e-tests] - uses: collaborationFactory/github-actions/.github/workflows/fe-tag.yml@release/25.2 + uses: collaborationFactory/github-actions/.github/workflows/fe-tag.yml@feature/PFM-TASK-7338-Backport-Sonar-Scan-in-github-actions with: GHA_REF: '' GHA_BASE: ${{ github.event.before }} diff --git a/.github/workflow-templates/fe/fe-tag-pushed.yml b/.github/workflow-templates/fe/fe-tag-pushed.yml index 861f8807..90746b76 100644 --- a/.github/workflow-templates/fe/fe-tag-pushed.yml +++ b/.github/workflow-templates/fe/fe-tag-pushed.yml @@ -16,7 +16,7 @@ env: jobs: release-version: - uses: collaborationFactory/github-actions/.github/workflows/fe-release.yml@release/25.2 + uses: collaborationFactory/github-actions/.github/workflows/fe-release.yml@feature/PFM-TASK-7338-Backport-Sonar-Scan-in-github-actions secrets: JFROG_BASE64_TOKEN: ${{ secrets.JFROG_BASE64_TOKEN }} JFROG_URL: ${{ secrets.JFROG_URL }} diff --git a/.github/workflows/fe-build.yml b/.github/workflows/fe-build.yml index c9655d52..0a9144eb 100644 --- a/.github/workflows/fe-build.yml +++ b/.github/workflows/fe-build.yml @@ -41,7 +41,7 @@ jobs: key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} - name: Build and Storybook - uses: collaborationFactory/github-actions/.github/actions/run-many@release/25.2 + uses: collaborationFactory/github-actions/.github/actions/run-many@feature/PFM-TASK-7338-Backport-Sonar-Scan-in-github-actions with: target: ${{ matrix.target }} jobIndex: ${{ matrix.jobIndex }} diff --git a/.github/workflows/fe-check-upmerge.yml b/.github/workflows/fe-check-upmerge.yml index a99ece62..c6d4baa9 100644 --- a/.github/workflows/fe-check-upmerge.yml +++ b/.github/workflows/fe-check-upmerge.yml @@ -32,7 +32,7 @@ jobs: key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} - name: check if upmerge is necessary and post to slack - uses: collaborationFactory/github-actions/.github/actions/upmerge@release/25.2 + uses: collaborationFactory/github-actions/.github/actions/upmerge@feature/PFM-TASK-7338-Backport-Sonar-Scan-in-github-actions env: SLACK_TOKEN_UPMERGE: ${{ secrets.SLACK_TOKEN_UPMERGE }} GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }} diff --git a/.github/workflows/fe-cleanup-snapshots.yml b/.github/workflows/fe-cleanup-snapshots.yml index 962dd503..eab6a47c 100644 --- a/.github/workflows/fe-cleanup-snapshots.yml +++ b/.github/workflows/fe-cleanup-snapshots.yml @@ -39,7 +39,7 @@ jobs: dot-npmrc: ${{ secrets.DOT_NPMRC }} - name: Cleanup Snapshot Artifacts - uses: collaborationFactory/github-actions/.github/actions/snapshots@release/25.2 + uses: collaborationFactory/github-actions/.github/actions/snapshots@feature/PFM-TASK-7338-Backport-Sonar-Scan-in-github-actions env: JFROG_BASE64_TOKEN: ${{ secrets.JFROG_BASE64_TOKEN }} JFROG_URL: ${{ secrets.JFROG_URL }} diff --git a/.github/workflows/fe-code-quality.yml b/.github/workflows/fe-code-quality.yml index 617b2858..8c3a9d10 100644 --- a/.github/workflows/fe-code-quality.yml +++ b/.github/workflows/fe-code-quality.yml @@ -60,7 +60,7 @@ jobs: - name: Unit Tests id: test - uses: collaborationFactory/github-actions/.github/actions/run-many@release/25.2 + uses: collaborationFactory/github-actions/.github/actions/run-many@feature/PFM-TASK-7338-Backport-Sonar-Scan-in-github-actions continue-on-error: true with: target: ${{ matrix.target }} diff --git a/.github/workflows/fe-e2e.yml b/.github/workflows/fe-e2e.yml index 5fc6418a..d6c074ee 100644 --- a/.github/workflows/fe-e2e.yml +++ b/.github/workflows/fe-e2e.yml @@ -43,7 +43,7 @@ jobs: run: npx cypress install - name: Affected Regression Tests - uses: collaborationFactory/github-actions/.github/actions/run-many@release/25.2 + uses: collaborationFactory/github-actions/.github/actions/run-many@feature/PFM-TASK-7338-Backport-Sonar-Scan-in-github-actions with: target: ${{ matrix.target }} jobIndex: ${{ matrix.jobIndex }} diff --git a/.github/workflows/fe-pr-close.yml b/.github/workflows/fe-pr-close.yml index fbc1a862..138540f6 100644 --- a/.github/workflows/fe-pr-close.yml +++ b/.github/workflows/fe-pr-close.yml @@ -45,7 +45,7 @@ jobs: run: npm ci - name: Delete Snapshots from NPM Registry - uses: collaborationFactory/github-actions/.github/actions/artifacts@release/25.2 + uses: collaborationFactory/github-actions/.github/actions/artifacts@feature/PFM-TASK-7338-Backport-Sonar-Scan-in-github-actions env: JFROG_BASE64_TOKEN: ${{ secrets.JFROG_BASE64_TOKEN }} JFROG_URL: ${{ secrets.JFROG_URL }} diff --git a/.github/workflows/fe-pr-snapshot.yml b/.github/workflows/fe-pr-snapshot.yml index 4cdf4c12..67266165 100644 --- a/.github/workflows/fe-pr-snapshot.yml +++ b/.github/workflows/fe-pr-snapshot.yml @@ -47,7 +47,7 @@ jobs: run: npm ci - name: Build and Push to Jfrog NPM Registry - uses: collaborationFactory/github-actions/.github/actions/artifacts@release/25.2 + uses: collaborationFactory/github-actions/.github/actions/artifacts@feature/PFM-TASK-7338-Backport-Sonar-Scan-in-github-actions env: JFROG_BASE64_TOKEN: ${{ secrets.JFROG_BASE64_TOKEN }} JFROG_URL: ${{ secrets.JFROG_URL }} diff --git a/.github/workflows/fe-release.yml b/.github/workflows/fe-release.yml index 9b4be817..a27f7343 100644 --- a/.github/workflows/fe-release.yml +++ b/.github/workflows/fe-release.yml @@ -50,7 +50,7 @@ jobs: uses: dawidd6/action-get-tag@v1 - name: Build and Push to Jfrog NPM Registry - uses: collaborationFactory/github-actions/.github/actions/artifacts@release/25.2 + uses: collaborationFactory/github-actions/.github/actions/artifacts@feature/PFM-TASK-7338-Backport-Sonar-Scan-in-github-actions env: JFROG_BASE64_TOKEN: ${{ secrets.JFROG_BASE64_TOKEN }} JFROG_URL: ${{ secrets.JFROG_URL }} diff --git a/.github/workflows/fe-snapshot.yml b/.github/workflows/fe-snapshot.yml index befae32b..5b0231ac 100644 --- a/.github/workflows/fe-snapshot.yml +++ b/.github/workflows/fe-snapshot.yml @@ -39,7 +39,7 @@ jobs: key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} - name: Build and Push to Jfrog NPM Registry - uses: collaborationFactory/github-actions/.github/actions/artifacts@release/25.2 + uses: collaborationFactory/github-actions/.github/actions/artifacts@feature/PFM-TASK-7338-Backport-Sonar-Scan-in-github-actions env: JFROG_BASE64_TOKEN: ${{ secrets.JFROG_BASE64_TOKEN }} JFROG_URL: ${{ secrets.JFROG_URL }} diff --git a/.github/workflows/fe-tag.yml b/.github/workflows/fe-tag.yml index 1ea0da4b..f9593a55 100644 --- a/.github/workflows/fe-tag.yml +++ b/.github/workflows/fe-tag.yml @@ -48,7 +48,7 @@ jobs: git config user.email ${{ secrets.GIT_USER_EMAIL }} - name: Bump Version and Push new Tag - uses: collaborationFactory/github-actions/.github/actions/artifacts@release/25.2 + uses: collaborationFactory/github-actions/.github/actions/artifacts@feature/PFM-TASK-7338-Backport-Sonar-Scan-in-github-actions env: JFROG_BASE64_TOKEN: ${{ secrets.JFROG_BASE64_TOKEN }} JFROG_URL: ${{ secrets.JFROG_URL }}