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

chore(ci): run TypeDoc generation in Code Quality Checks action #4345

Merged
merged 2 commits into from
Oct 1, 2020

Conversation

davidgovea
Copy link
Contributor

@davidgovea davidgovea commented Oct 1, 2020

Related issues

Fixes #4321

Description

This PR adds TypeDoc generation in the Code Quality Checks action. In PR #4306, a typedoc failure was causing the Vercel deployment phase to fail, and those logs aren't public.

There were a few challenges that required decisions:

  • typedoc is a dependency of website/, which is not part of the lerna/workspace, so its dependencies are not installed in current actions.
    • I chose to add another Yarn Install (Website) stage, with the existing retry pattern.
      • I also changed the cache key for the yarn cache (adding -with-website) since additional packages are installed. Not certain this is correct, so be sure to review
    • Other options: add typedoc as a root dependency, or do a one-off yarn add typedoc in the CI action
  • There existed a second scripts/generate-typedoc.js script that is no longer used. It did not receive the recent typedoc changes that the website/scripts/generate-typedoc.js file did, so it is not currently functional.
    • I chose to delete it.
    • Other options: keep it, and either import the website/ script, or duplicate the new TSConfigReader change into it.
  • The website/scripts/generate-typedoc.js file is not a callable script.

Thanks for reviewing!

Release Summary

N/A

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
    • Yes
  • My change supports the following platforms;
    • Android (N/A)
    • iOS (N/A)
  • My change includes tests;
    • e2e tests added or updated in packages/\*\*/e2e (N/A)
    • jest tests added or updated in packages/\*\*/__tests__ (N/A)
  • I have updated TypeScript types that are affected by my change. (N/A)
  • This is a breaking change;
    • Yes
    • No

Test Plan

CI actions
https://github.com/invertase/react-native-firebase/pull/4345/checks?check_run_id=1196025300


Think react-native-firebase is great? Please consider supporting the project with any of the below:

Outdated file: `typedoc` is only a dependency of `website/`, and this
file lacked the latest updates requried for recent typedoc
compatibility.
@vercel
Copy link

vercel bot commented Oct 1, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/invertase/react-native-firebase/ngg1uqv9e
✅ Preview: https://react-native-firebase-git-fork-davidgovea-typedoc-check.invertase.vercel.app

id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }}-with-website
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting I think if you just put the yarn-cache from checkout package.json doesn't have the full thing yet so that key won't be right. This seems like a fine workaround given that it's not in the workspace so not in package.json by default.

Copy link
Collaborator

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the decisions you made on the items you highlighted are sane, from my perspective, I'm +1 but I'll mark for second review just in case

Thanks for digging in to this as well!

@mikehardy mikehardy requested a review from Salakar October 1, 2020 22:57
@mikehardy
Copy link
Collaborator

@Salakar the tradeoffs enumerated above are worth a second look I think - look good to me, but just in case...

Copy link
Member

@Salakar Salakar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great to me and the PR was well written, so tyvm for that!

@mikehardy mikehardy merged commit 5db2463 into invertase:master Oct 1, 2020
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.

Run generate-typedoc.js in CI code quality checks
3 participants