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

ci: add component test #15071

Merged
merged 3 commits into from
Feb 21, 2023
Merged

ci: add component test #15071

merged 3 commits into from
Feb 21, 2023

Conversation

yqrashawn
Copy link
Contributor

@yqrashawn yqrashawn commented Feb 13, 2023

fixes #14417

status: ready

Makefile Outdated Show resolved Hide resolved
@status-im-auto
Copy link
Member

status-im-auto commented Feb 13, 2023

Jenkins Builds

Click to see older builds (115)
Commit #️⃣ Finished (UTC) Duration Platform Result
45b6af5 #1 2023-02-13 08:24:41 ~2 min tests 📄log
45b6af5 #3 2023-02-13 08:30:16 ~2 min tests 📄log
✔️ f86a7e8 #2 2023-02-13 08:33:31 ~7 min ios 📱ipa 📲
✔️ f86a7e8 #2 2023-02-13 08:34:15 ~7 min android 🤖apk 📲
✔️ f86a7e8 #2 2023-02-13 08:34:21 ~7 min android-e2e 🤖apk 📲
✔️ eefe156 #4 2023-02-13 08:42:03 ~4 min tests 📄log
✔️ eefe156 #3 2023-02-13 08:44:58 ~7 min ios 📱ipa 📲
✔️ bf14de8 #6 2023-02-13 08:54:01 ~4 min tests 📄log
✔️ bf14de8 #5 2023-02-13 08:57:06 ~7 min ios 📱ipa 📲
✔️ bf14de8 #5 2023-02-13 08:57:51 ~7 min android-e2e 🤖apk 📲
✔️ bf14de8 #5 2023-02-13 08:58:25 ~8 min android 🤖apk 📲
0855dd8 #7 2023-02-13 13:01:25 ~3 min tests 📄log
✔️ 0855dd8 #6 2023-02-13 13:05:31 ~7 min android-e2e 🤖apk 📲
e6782df #9 2023-02-13 13:12:42 ~3 min tests 📄log
✔️ e6782df #8 2023-02-13 13:17:43 ~8 min ios 📱ipa 📲
✔️ e6782df #8 2023-02-13 13:17:52 ~8 min android-e2e 🤖apk 📲
✔️ e6782df #8 2023-02-13 13:18:05 ~8 min android 🤖apk 📲
9d580b4 #10 2023-02-13 13:31:42 ~3 min tests 📄log
✔️ 9d580b4 #9 2023-02-13 13:35:50 ~7 min android-e2e 🤖apk 📲
✔️ 9d580b4 #9 2023-02-13 13:36:13 ~7 min android 🤖apk 📲
✔️ 9d580b4 #9 2023-02-13 13:40:45 ~12 min ios 📱ipa 📲
0bcd5f7 #11 2023-02-13 14:01:33 ~6 min tests 📄log
✔️ 0bcd5f7 #10 2023-02-13 14:04:51 ~9 min android 🤖apk 📲
✔️ 0bcd5f7 #10 2023-02-13 14:06:02 ~11 min android-e2e 🤖apk 📲
bdb2145 #13 2023-02-13 14:18:42 ~2 min tests 📄log
✔️ bdb2145 #12 2023-02-13 14:23:35 ~7 min ios 📱ipa 📲
✔️ bdb2145 #12 2023-02-13 14:25:02 ~8 min android-e2e 🤖apk 📲
✔️ bdb2145 #12 2023-02-13 14:25:11 ~8 min android 🤖apk 📲
✔️ 4635ce6 #15 2023-02-14 11:44:35 ~3 min tests 📄log
✔️ 4635ce6 #14 2023-02-14 11:47:37 ~6 min ios 📱ipa 📲
✔️ 4635ce6 #14 2023-02-14 11:48:42 ~7 min android-e2e 🤖apk 📲
✔️ 4635ce6 #14 2023-02-14 11:48:53 ~8 min android 🤖apk 📲
c0ea5e8 #18 2023-02-14 12:02:32 ~4 min tests 📄log
c0ea5e8 #19 2023-02-14 12:05:12 ~2 min tests 📄log
7e33d87 #20 2023-02-14 12:08:01 ~2 min tests 📄log
✔️ 7e33d87 #18 2023-02-14 12:12:58 ~7 min ios 📱ipa 📲
✔️ 7e33d87 #18 2023-02-14 12:14:08 ~8 min android-e2e 🤖apk 📲
✔️ 7e33d87 #18 2023-02-14 12:14:26 ~8 min android 🤖apk 📲
✔️ 76dee5d #21 2023-02-14 12:27:31 ~3 min tests 📄log
d14d68a #22 2023-02-14 12:31:37 ~2 min tests 📄log
d14d68a #23 2023-02-14 12:35:37 ~3 min tests 📄log
✔️ d14d68a #20 2023-02-14 12:35:49 ~7 min ios 📱ipa 📲
✔️ d14d68a #20 2023-02-14 12:36:45 ~8 min android 🤖apk 📲
✔️ d14d68a #20 2023-02-14 12:37:03 ~8 min android-e2e 🤖apk 📲
584ab4c #25 2023-02-14 12:46:31 ~4 min tests 📄log
✔️ 584ab4c #22 2023-02-14 12:49:26 ~7 min android-e2e 🤖apk 📲
✔️ 584ab4c #22 2023-02-14 12:49:52 ~7 min ios 📱ipa 📲
✔️ 584ab4c #22 2023-02-14 12:50:36 ~8 min android 🤖apk 📲
d0e80ea #26 2023-02-14 12:53:44 ~1 min tests 📄log
d0e80ea #27 2023-02-14 12:56:16 ~1 min tests 📄log
✔️ d0e80ea #23 2023-02-14 12:59:06 ~7 min ios 📱ipa 📲
✔️ d0e80ea #23 2023-02-14 13:00:27 ~8 min android-e2e 🤖apk 📲
✔️ d0e80ea #23 2023-02-14 13:00:41 ~8 min android 🤖apk 📲
d0f0f14 #28 2023-02-14 13:07:13 ~4 min tests 📄log
✔️ d0f0f14 #24 2023-02-14 13:09:38 ~6 min ios 📱ipa 📲
✔️ d0f0f14 #24 2023-02-14 13:11:12 ~8 min android-e2e 🤖apk 📲
✔️ d0f0f14 #24 2023-02-14 13:11:28 ~8 min android 🤖apk 📲
2e5ce92 #29 2023-02-14 13:17:07 ~2 min tests 📄log
✔️ 2e5ce92 #25 2023-02-14 13:21:31 ~6 min ios 📱ipa 📲
✔️ 2e5ce92 #25 2023-02-14 13:22:29 ~7 min android-e2e 🤖apk 📲
✔️ 2e5ce92 #25 2023-02-14 13:23:51 ~9 min android 🤖apk 📲
✔️ bcd4faf #30 2023-02-14 14:11:51 ~4 min tests 📄log
bcd4faf #31 2023-02-14 14:16:05 ~3 min tests 📄log
✔️ bcd4faf #26 2023-02-14 14:16:17 ~9 min android-e2e 🤖apk 📲
✔️ bcd4faf #26 2023-02-14 14:17:14 ~9 min android 🤖apk 📲
47574b4 #32 2023-02-14 14:20:25 ~3 min tests 📄log
a2612ef #33 2023-02-14 14:23:02 ~2 min tests 📄log
39beab0 #34 2023-02-14 14:27:33 ~3 min tests 📄log
✔️ 39beab0 #29 2023-02-14 14:32:30 ~8 min android-e2e 🤖apk 📲
✔️ 39beab0 #29 2023-02-14 14:32:47 ~8 min android 🤖apk 📲
✔️ 39beab0 #29 2023-02-14 14:33:13 ~9 min ios 📱ipa 📲
39beab0 #35 2023-02-14 14:37:05 ~6 min tests 📄log
✔️ 39beab0 #36 2023-02-15 02:18:44 ~2 min tests 📄log
14d81a8 #37 2023-02-15 02:23:05 ~3 min tests 📄log
✔️ 14d81a8 #30 2023-02-15 02:26:51 ~7 min android-e2e 🤖apk 📲
✔️ 14d81a8 #30 2023-02-15 02:27:00 ~7 min ios 📱ipa 📲
14d81a8 #38 2023-02-15 02:27:55 ~3 min tests 📄log
✔️ 14d81a8 #30 2023-02-15 02:29:07 ~9 min android 🤖apk 📲
✔️ 14d81a8 #39 2023-02-15 02:55:03 ~2 min tests 📄log
✔️ 998a115 #40 2023-02-16 05:34:49 ~2 min tests 📄log
✔️ 998a115 #31 2023-02-16 05:39:16 ~7 min ios 📱ipa 📲
✔️ 998a115 #31 2023-02-16 05:40:22 ~8 min android-e2e 🤖apk 📲
✔️ 998a115 #31 2023-02-16 05:40:48 ~8 min android 🤖apk 📲
✔️ 998a115 #41 2023-02-16 05:57:03 ~2 min tests 📄log
✔️ 998a115 #42 2023-02-16 06:01:46 ~2 min tests 📄log
✔️ 998a115 #43 2023-02-16 06:19:21 ~2 min tests 📄log
✔️ 998a115 #44 2023-02-16 06:58:03 ~2 min tests 📄log
✔️ 998a115 #46 2023-02-16 07:09:00 ~3 min tests 📄log
✔️ 998a115 #33 2023-02-16 07:12:16 ~7 min ios 📱ipa 📲
✔️ 998a115 #33 2023-02-16 07:12:52 ~7 min android 🤖apk 📲
✔️ 998a115 #33 2023-02-16 07:13:36 ~8 min android-e2e 🤖apk 📲
✔️ 998a115 #47 2023-02-16 07:14:27 ~2 min tests 📄log
5d16597 #45 2023-02-16 07:02:50 ~2 min tests 📄log
✔️ c1d07b8 #48 2023-02-17 01:06:31 ~3 min tests 📄log
✔️ c1d07b8 #34 2023-02-17 01:10:29 ~6 min ios 📱ipa 📲
✔️ c1d07b8 #34 2023-02-17 01:12:02 ~8 min android-e2e 🤖apk 📲
✔️ c1d07b8 #34 2023-02-17 01:12:11 ~8 min android 🤖apk 📲
47202ea #50 2023-02-17 11:52:10 ~4 min tests 📄log
✔️ 47202ea #37 2023-02-17 11:56:37 ~8 min ios 📱ipa 📲
✔️ 47202ea #37 2023-02-17 11:56:59 ~9 min android-e2e 🤖apk 📲
✔️ 47202ea #37 2023-02-17 11:57:15 ~9 min android 🤖apk 📲
47202ea #51 2023-02-17 12:05:00 ~3 min tests 📄log
✔️ 8f6aa0b #39 2023-02-17 12:33:04 ~9 min ios 📱ipa 📲
8f6aa0b #53 2023-02-17 12:43:15 ~19 min tests 📄log
✔️ 8f6aa0b #39 2023-02-17 12:45:46 ~21 min android-e2e 🤖apk 📲
✔️ 8f6aa0b #39 2023-02-17 12:46:31 ~22 min android 🤖apk 📲
✔️ 8f6aa0b #54 2023-02-17 12:47:14 ~3 min tests 📄log
✔️ 8f6aa0b #55 2023-02-17 12:51:49 ~3 min tests 📄log
✔️ 8f6aa0b #56 2023-02-17 12:57:46 ~4 min tests 📄log
✔️ 8f6aa0b #57 2023-02-17 13:24:03 ~7 min tests 📄log
8f6aa0b #58 2023-02-17 13:46:18 ~4 min tests 📄log
✔️ 3f428f0 #60 2023-02-20 11:34:23 ~4 min tests 📄log
✔️ 3f428f0 #41 2023-02-20 11:37:20 ~7 min ios 📱ipa 📲
✔️ 3f428f0 #41 2023-02-20 11:38:00 ~7 min android 🤖apk 📲
✔️ 3f428f0 #41 2023-02-20 11:38:25 ~8 min android-e2e 🤖apk 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 220559a #61 2023-02-20 11:59:15 ~4 min tests 📄log
✔️ 220559a #42 2023-02-20 12:03:10 ~8 min android-e2e 🤖apk 📲
✔️ 220559a #42 2023-02-20 12:03:38 ~8 min android 🤖apk 📲
✔️ 220559a #42 2023-02-20 12:04:21 ~9 min ios 📱ipa 📲
✔️ 6582844 #62 2023-02-21 05:25:13 ~4 min tests 📄log
✔️ 6582844 #43 2023-02-21 05:28:06 ~7 min ios 📱ipa 📲
✔️ 6582844 #43 2023-02-21 05:30:18 ~9 min android-e2e 🤖apk 📲
✔️ 6582844 #43 2023-02-21 05:30:44 ~9 min android 🤖apk 📲

@yqrashawn yqrashawn marked this pull request as draft February 13, 2023 08:26
@yqrashawn yqrashawn changed the title ci: add component test ci: add component test [WIP] Feb 13, 2023
@yqrashawn
Copy link
Contributor Author

to draft, since ci failed

@yqrashawn
Copy link
Contributor Author

Seems caused by two yarn install at the same time
try run sequentially

@yqrashawn yqrashawn force-pushed the ci/add-component-test branch 3 times, most recently from 8ae05b8 to bf14de8 Compare February 13, 2023 08:49
@yqrashawn
Copy link
Contributor Author

yqrashawn commented Feb 13, 2023

works fine running one by one

seems this is the error causing the crash
https://ci.status.im/blue/organizations/jenkins/status-mobile%2Fprs%2Ftests/detail/PR-15071/3/pipeline/#step-39-log-155
../modules/react-native-status/nodejs/status.cpp:1936:1: fatal error: opening dependency file ./Release/.deps/Release/obj.target/status_nodejs_addon/modules/react-native-status/nodejs/status.o.d.raw: No such file or directory

is it possible to tell react-native-status to wait for another build?


also need to checkout if we need it in tests


or we just run them one by one, each takes little less than 2m


another error, related to react-native-status as well

[2023-02-13T08:23:09.598Z] rm: cannot remove './Release/.deps/Release/obj.target/status_nodejs_addon/modules/react-native-status/nodejs/status.o.d.raw': No such file or directory
[2023-02-13T08:23:09.598Z] make[1]: *** [status_nodejs_addon.target.mk:107: Release/obj.target/status_nodejs_addon/modules/react-native-status/nodejs/status.o] Error 1

ci/Jenkinsfile.tests Outdated Show resolved Hide resolved
@yqrashawn yqrashawn force-pushed the ci/add-component-test branch 11 times, most recently from 999f64e to 9d33943 Compare February 14, 2023 11:53
@yqrashawn yqrashawn marked this pull request as ready for review February 14, 2023 11:55
@yqrashawn
Copy link
Contributor Author

ready for review
use CHILD_CONCURRENCY=1 to avoid node-gyp build error when running multiple yarn install in parallel

yarn doc https://classic.yarnpkg.com/en/docs/envvars#toc-child-concurrency
related discussion yarnpkg/yarn#1874

@Parveshdhull
Copy link
Member

Sorry @yqrashawn, for spamming PR, I think we should create an issue

@yqrashawn
Copy link
Contributor Author

Hi @Parveshdhull the Cannot find module error is caused by no lib folder in node_modules/@react-native-community/blur/

It's included in files in package.json https://github.com/Kureev/react-native-blur/blob/master/package.json#L12 which means it's included when publishing to npm

We are using the git+https scheme so that there's no lib folder until we run yarn install (yarn2nix runs yarn install with --ignore-scripts), which will trigger the prepare script in package.json https://github.com/Kureev/react-native-blur/blob/master/package.json#L28

We can fix it by one of below means

  1. add lib folder and other missing files in package.json files field into git
  2. publish the package to npm and use the npm version instead of git+https, this seems to be the long term solution if we keep facing the need to use self patched packages
  3. try to make it possible to run these hook scripts in yarn2nix, I tried this by setting yarnFlagsin nix/deps/nodejs/default.nix, but yarn still print warning about scripts disabled. Although, I'm not really understand nix.

@Parveshdhull
Copy link
Member

Parveshdhull commented Feb 17, 2023

Hi @yqrashawn, Thank you finding this fix. I merged your PR status-im/react-native-blur#1 and bumped version to
4.3.1-status

That error got fixed, but another similar error popped up
/home/parvesh_monu/Desktop/ArchFiles/React/status-mobile/node_modules/react-native-reanimated/lib/createAnimatedComponent.js: Cannot find module '@babel/plugin-proposal-optional-chaining'

@Parveshdhull
Copy link
Member

That error got fixed, but another similar error popped up

Looks like this error was caused by some leftover local changes, working great now 🎉

@yqrashawn yqrashawn force-pushed the ci/add-component-test branch 5 times, most recently from 6f49ad2 to 8f6aa0b Compare February 17, 2023 12:23
@yqrashawn
Copy link
Contributor Author

Got these errors from 3 fails after deps change. The 4/5th run passes.

Cannot find module '@babel/runtime/helpers/interopRequireDefault' from 'index.js'
Cannot find module 'object-assign' from 'factoryWithTypeCheckers.js'
Cannot find module 'slash'
Cannot find module 'object-assign' from 'factoryWithTypeCheckers.js'

jest using node.js os.tmpdir as default cache dir, which got cleared after each run by make purge

@yqrashawn yqrashawn force-pushed the ci/add-component-test branch 2 times, most recently from 3c75853 to 3f428f0 Compare February 20, 2023 11:29
@yqrashawn
Copy link
Contributor Author

Decide to put component test after unit test and run them sequentially.
make component-test relies on the yarn install in make test

@yqrashawn yqrashawn marked this pull request as ready for review February 20, 2023 11:52
Copy link
Contributor

@J-Son89 J-Son89 left a comment

Choose a reason for hiding this comment

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

Great work @yqrashawn 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Add CI/CD job for component tests
5 participants