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

Consolidate documentation/reports with coverage #194

Open
3 of 5 tasks
kbuffardi opened this issue Apr 25, 2023 · 9 comments
Open
3 of 5 tasks

Consolidate documentation/reports with coverage #194

kbuffardi opened this issue Apr 25, 2023 · 9 comments

Comments

@kbuffardi
Copy link
Contributor

kbuffardi commented Apr 25, 2023

Currently, there is a dedicated backend/docs folder for project documentation, but I would like a consolidated docs folder that includes any relevant documentation anywhere in the system. We need to do the following

  • Move backend/docs to a docs folder in the root directory
  • Consolidate coverage analysis that commits a single html report to the docs folder:
    • The coverage analysis should run on Actions whenever a PR is created OR when there is a merge into main. However, the report should only be committed (and badge in README.md updated) when it is accepted into main.
    • Both backend and frontend coverage should be analyzed in a single report (not as separate scripts/tools, if it can be avoided)
    • Only typescript files that are in our repo (i.e. no libraries or third-party dependencies) should be analyzed
@kbuffardi
Copy link
Contributor Author

This is particularly relevant to everyone who worked on #185 and #179

@kbuffardi
Copy link
Contributor Author

@decoles are you sure you got the right issue number? It doesn't look like this issue has been resolved.

@chetan2298
Copy link
Contributor

@Anoushka444 @G1411 Opened a new branch consolidated_docs to collaborate on this issue

@chetan2298
Copy link
Contributor

@G1411 @Anoushka444 Please suggest which subtasks would suit you the best and start working on them!

@G1411
Copy link

G1411 commented May 11, 2023

Sourabh and I'll work on the actions and readme

@decoles
Copy link
Contributor

decoles commented May 12, 2023

Apologies I did not get the right number, thank you for fixing!

@chetan2298
Copy link
Contributor

#244 This PR has experimental changes for the Test and coverage report github actions.

  • It combines the coverage report workflow to run FE and BE tests in a single job
  • It also features running FE and BE tests in a single job (which can be explored incase we want to reduce total number of pipelines)
    -The last commit in the PR restores the test action to run two jobs (One for FE and BE respectively)

@chetan2298
Copy link
Contributor

In today's discussion with @Anoushka444
When we were discussing how to set up the combined test coverage for our project, we had two options. The first option was to use the nyc package, which is a command-line tool that runs tests and generates a single code coverage report for both the frontend and backend. The second option was to create a custom setup that would read the tests from both the frontend and backend folders and create a single coverage report.

After some discussion, we decided to go with the second option. We created a package.json file (only to aid coverage-report workflow) in the root directory of the project and added the necessary dependencies. We also created a jest.config.js file, which lets us specify the test paths for both the frontend and backend. This configuration ensured that when we ran the tests, they would be read from both the frontend and backend folders, and the results would be combined to generate a single coverage report.

By using this custom setup, we were able to have greater control over the coverage process and generate a single report that covered both the frontend and backend code. The coverage report is stored in the pantrynode/docs/coverage folder, making it easily accessible.

The coverage folder (when generated) also features backend and frontend directories with html coverage of overall and specific tsx/ts files.

We also experimented with running a single job for testing workflow to reduce the total number of pipelines (can be used if needed). We also corrected the backend test coverage , although we re still not sure how backend and their tests behave.

@chetan2298
Copy link
Contributor

#244

@chetan2298 chetan2298 linked a pull request May 16, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants