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

Test Jest website build for every PR #6613

Merged
merged 1 commit into from
Jul 4, 2018
Merged

Test Jest website build for every PR #6613

merged 1 commit into from
Jul 4, 2018

Conversation

endiliey
Copy link
Contributor

@endiliey endiliey commented Jul 4, 2018

Summary

This is successor of #6590.

Changes:

  1. CircleCI will try to build jest website when it is a PULL REQUEST instead of just skipping it. This is to ensure that there is nothing wrong with building the website
  2. Use a safe getter function (inspired from Facebook idx function to access deeply nested values of an object)

Notice this

translation[this.props.language]['localized-strings'].tagline

This can cause build error which will return an unhandled promise. Currently jest use Docusaurus 1.3.0 which doesn't give non zero exit code when there is a build error. This is fixed in Docusaurus >= 1.3.1

Current local yarn build has an unhandled promise (build error)
yarn build before

Current website deploy has an unhandled promise (build error)
https://circleci.com/gh/facebook/jest/27857
image

Test plan

  1. Ensure that yarn build has no more unhandled promise

yarn build after

2. Check this PR circleci run, should try to build the website for testing

https://circleci.com/gh/facebook/jest/27867

ci build

@endiliey
Copy link
Contributor Author

endiliey commented Jul 4, 2018

If this PR got merged, the next step is to setup a netlify preview like Docusaurus.
cc @SimenB @thymikee

Example:
2
1

However, this can only be done by people with write access to facebook/jest. Docusaurus netlify preview is set up by @yangshun

@@ -129,7 +130,7 @@ jobs:
- store_test_results:
path: reports/junit

test-and-deploy-website:
test-or-deploy-website:
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe we should call it just deploy-website

Copy link
Contributor Author

@endiliey endiliey Jul 4, 2018

Choose a reason for hiding this comment

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

I can change the name but is the naming okay ?

this PR implementation is

  • if it is a push to branch (not a PR) -> deploy jestjs.io website
  • if it is a PR -> test the static website build without deploying

Copy link
Collaborator

Choose a reason for hiding this comment

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

You're right, we should leave this naming

@codecov-io
Copy link

Codecov Report

Merging #6613 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #6613   +/-   ##
=======================================
  Coverage   63.73%   63.73%           
=======================================
  Files         235      235           
  Lines        8935     8935           
  Branches        4        4           
=======================================
  Hits         5695     5695           
  Misses       3239     3239           
  Partials        1        1

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6edbeb1...70488c7. Read the comment docs.

@SimenB
Copy link
Member

SimenB commented Jul 4, 2018

I bet you need admin access to set it up - collaborators don't have access to bots or settings. Perhaps @JoelMarcey can do it for us?

@SimenB SimenB merged commit d6db226 into jestjs:master Jul 4, 2018
@endiliey
Copy link
Contributor Author

endiliey commented Jul 4, 2018

Oh right thats true. By the way Joel is on PTO for around 2 weeks since yesterday. I guess we'll have to wait

@endiliey endiliey deleted the testbuild branch July 4, 2018 11:18
@yangshun
Copy link
Contributor

yangshun commented Jul 4, 2018

Yes, admin access is required. We'd need Christoph or Joel to do it. Does @aaronabramov have admin access?

@JoelMarcey
Copy link
Contributor

When I get to a computer, I can do this or give @yangshun temporary admin access to do this.

Sent with GitHawk

@JoelMarcey
Copy link
Contributor

@yangshun Ping me on messenger when you are online again, I can grant you access.

@rickhanlonii
Copy link
Member

@JoelMarcey @yangshun can you force https while you're in the settings?

@JoelMarcey
Copy link
Contributor

@rickhanlonii Just did that! 😄

@SimenB
Copy link
Member

SimenB commented Jul 19, 2018

@endiliey any idea why all my PRs fail to deploy with netlify?

Failing build: Failed to prepare repo

See e.g. #6716

@endiliey
Copy link
Contributor Author

endiliey commented Jul 19, 2018

@SimenB
I am not really sure, I don't have access to jest netlify. However, from the error, it suggests netlify not being able to clone from github.

https://app.netlify.com/sites/jest-preview/deploys/5b5090ffdd28ef7e1a118cde

9:24:15 PM: Build ready to start
9:24:16 PM: Fetching cached dependencies
9:24:16 PM: Starting to download cache of 346.4MB
9:24:18 PM: Finished downloading cache in 1.999510577s
9:24:18 PM: Starting to extract cache
9:24:23 PM: Finished fetching cache in 7.140422175s
9:24:23 PM: Starting to prepare the repo for build
9:24:24 PM: Preparing Git Reference pull/6716/head
9:24:26 PM: Failing build: Failed to prepare repo
9:24:26 PM: failed during stage 'preparing repo': exit status 1
9:24:26 PM: Finished processing build request in 9.606085246s

That PR #6716 also seems to have no relevant website files change

@yangshun any ideas ?

Edit:
Seems like it is caused by build cache error on netlify

I have cleared the build cache. It should work for the future build now

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants