docusaurus icon indicating copy to clipboard operation
docusaurus copied to clipboard

test: add docusaurus deploy CI tests

Open slorber opened this issue 3 years ago â€ĸ 5 comments

Pre-flight checklist

  • [x] I have read the Contributing Guidelines on pull requests.
  • [ ] If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • [ ] If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

As mentioned in https://github.com/facebook/docusaurus/pull/7702, we don't have any automated way to ensure our deploy CLI keeps working over time, and any modification usually requires manual tests to ensure nothing gets broken.

These CLI scripts are not really easy to test as they usually run multiple complex Git commands.

I suggest we run as part of our CI tests to deploy a build dir to a real Git repo branch, ensuring at least the "happy path" of that script keeps working over time.

Test Plan

CI

slorber avatar Jul 01 '22 13:07 slorber

[V2]

Name Link
Latest commit 6c59142a0303787db6896ec0d3234bd6783eb1b1
Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/62bef62bc4493c000806a013
Deploy Preview https://deploy-preview-7714--docusaurus-2.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] avatar Jul 01 '22 13:07 netlify[bot]

âšĄī¸ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🟠 76 đŸŸĸ 100 đŸŸĸ 100 đŸŸĸ 100 đŸŸĸ 90 Report
/docs/installation 🟠 75 đŸŸĸ 100 đŸŸĸ 100 đŸŸĸ 100 đŸŸĸ 90 Report

github-actions[bot] avatar Jul 01 '22 13:07 github-actions[bot]

[V2]

Name Link
Latest commit 1bdff13c319cbc2fb56b1634c28704c4f5cb1df1
Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/62bf012f0a6ce40008c50b32
Deploy Preview https://deploy-preview-7714--docusaurus-2.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] avatar Jul 01 '22 13:07 netlify[bot]

Size Change: 0 B

Total Size: 802 kB

â„šī¸ View Unchanged
Filename Size
website/.docusaurus/globalData.json 52.6 kB
website/build/assets/css/styles.********.css 107 kB
website/build/assets/js/main.********.js 604 kB
website/build/index.html 38.9 kB

compressed-size-action

github-actions[bot] avatar Jul 01 '22 13:07 github-actions[bot]

Will have to figure out if we still have a deploy token set on this repo 😅

Not sure we could run this workflow on external PRs, as we'd need a user to push to the origin? đŸ¤ˇâ€â™‚ī¸

slorber avatar Jul 01 '22 13:07 slorber