Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Portals 3435: Add sonarcloud scan to build-test workflow #1604

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

afwillia
Copy link
Contributor

The goal of this PR is to add code coverage reporting to sonarcloud scans.

The build-test.yml workflow now includes test coverage and a sonarcloud scan for synapse-react-client. It also adds a test coverage script to several package.json files to ensure compatibility with the workflow. The preliminary sonarqube-scan.yml workflow has been deleted in favor of integrating it with test coverage reporting.

In build-test.yml, the test job now runs the script test:coverage instead of test. For each project with an existing test script, test:coverage now runs the corresponding jest or vitest command with --coverage to generate a report.

The jest and vitest config files now include lcov which outputs a lcov.info required for sonarcloud coverage reports.

Various package.json files in the apps and packages directories now include test:coverage in addition to test.

Currently, the sonarcloud scan will only run for synapse-react-client. Reports for other projects can be generated by adding them to this file.

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.

1 participant