Skip to content

Combine workflows with PR builds, conditional deploys, and coverage for SonarQube#36

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/combine-workflows-and-add-coverage
Draft

Combine workflows with PR builds, conditional deploys, and coverage for SonarQube#36
Copilot wants to merge 2 commits intomainfrom
copilot/combine-workflows-and-add-coverage

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 8, 2025

Consolidates codeql.yml and build-and-deploy.yml into a unified CI/CD pipeline. Deploys only on main branch merges while enabling builds on PR open/sync. Adds coverage generation and artifact passing to SonarQube.

Changes

Workflow consolidation

  • Combined two workflows into .github/workflows/ci-cd.yml
  • 4 jobs: build, codeql, sonarqube, deploy

Trigger configuration

on:
  push:
    branches: [main]
  pull_request:
    types: [opened, synchronize]

Coverage integration

  • Changed test command to pnpm test:coverage in build job
  • Upload coverage as artifact after test run
  • SonarQube job downloads artifact for ingestion
  • Existing sonar-project.properties already configured for coverage/lcov.info

Conditional deployment

deploy:
  if: github.event_name == 'push' && github.ref == 'refs/heads/main'
  • Pages setup/upload steps also conditional on main push
  • Build and analysis run on all triggers, deploy only on main

Job dependencies

  • codeql: runs independently in parallel
  • sonarqube: depends on build for coverage artifact
  • deploy: depends on build for Pages artifact
Original prompt

Combine my two workflows, ensuring the deploy only takes place on merge to main but allowin the build to happen on every pr open and sync. Add a coverage report generation to my testing and make sure sonarqube injests that coverage report.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: heckerdj <22299058+heckerdj@users.noreply.github.com>
Copilot AI changed the title [WIP] Combine workflows with build and coverage report generation Combine workflows with PR builds, conditional deploys, and coverage for SonarQube Nov 8, 2025
Copilot AI requested a review from heckerdj November 8, 2025 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants