-
Notifications
You must be signed in to change notification settings - Fork 198
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
Add GUI tests #1698
Add GUI tests #1698
Conversation
7a56fd2
to
2f2d4a7
Compare
I'm a bit stuck with the current docker situation. So to sum up what I tried to and what my issue is:
So now the problem is that I think putting everything in one docker container isn't a great idea because it makes a big image which needs to be rebuilt every time there is a change on docs.rs source code. The other problem is that apparently, we can't start docs.rs web server in the container: it exists right away (without an error). So first: is it the right approach? Secondly: any help would be very appreciated. |
238be21
to
744a2f2
Compare
So I was finally able to make it work like I wanted. I even added it to the docker-compose and I added a shell script to make it simpler to run. |
de2cdce
to
6048c15
Compare
Maybe ping @Nemo157 ? |
@syphar It's "ready" now, we need to discuss about if this looks good to you or if it seems to complicated to maintain and eventually try to pick another solution. |
Thanks for the ping! For my understanding: rustdoc is actively using the same framework? |
Yes. You can see it being used in |
52f6835
to
c6a348d
Compare
I updated to the last version of the framework and added some documentation in case you want to run it locally. So with this, it should be ready. From here, the plan is then to test as much as possible our UI, especially the top-navbar and all docs.rs pages. |
c3c4f97
to
dfb87e4
Compare
CI finally passed! \o/ PR is now ready. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only one last comment from my side. I wonder if we can safe time on the setup, or if caching will help a a little, 20 minutes, are quite long.
I would like to have a short test from @Nemo157 because I can't currently run the tests on my mac
Yes, 20 minutes is way too long. If you know how to cache it, I'd be very happy to do it.
Is it because of this PR or something specific to your mac? |
do you know where most of the time is spent?
I mean these GUI tests don't run, the other tests do. the but running the test script leads to another error related to the host / container platform (I'm on an M1). But IMO this doesn't block this PR, I'll figure it out afterwards. |
Oh wow. It took only 8 minutes without |
I also can't use a local |
Wow, weird. I thought using docker would prevent all these issues. ^^' |
rustwide does all the toolchain installation outside docker containers for some reason (it should be possible to move that all into the containers, which would probably make it work on macos just fine too). |
I see. Do you want it to be fixed before we merge this PR or after? |
It's orthogonal to this PR (and given maintenance status of rustwide unlikely to happen soon). I plan to see if I can adapt the script here to run everything inside docker-compose containers, can probably get around to it today if it's not too complicated. |
Thanks! :D |
I'll let you handle the merge when you're ready then. Thanks for the help! |
Yep |
Awesome! \o/ |
Part of #1494.
I finally took the time to wrap something together. So in this case, I took what we do for rustdoc and simply ported it to docs.rs. I added 2 GUI tests so you can take a look at what they look like. The documentation for the framework is here.
Do you think this is the right approach or would you prefer another framework?