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

Pipeline/e2e #453

Merged
merged 20 commits into from
Apr 17, 2023
Merged

Pipeline/e2e #453

merged 20 commits into from
Apr 17, 2023

Conversation

henrixapp
Copy link
Collaborator

This pull request is to be merged after #441 .

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Upgrade cypress to 12 and fix the setup.

  • What is the current behavior? (You can also link to an open issue here)

CI for e2e tests does not work.

  • What is the new behavior (if this is a feature change)?

no

  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

no

  • Other information:

@henrixapp henrixapp requested a review from Splines April 10, 2023 18:07
@henrixapp henrixapp added the CI/CD Continuous Integration / Continuous Delivery (aka pipeline stuff) label Apr 10, 2023
@henrixapp henrixapp linked an issue Apr 10, 2023 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Apr 10, 2023

Codecov Report

Merging #453 (fa22c86) into mampf-next (7db4b45) will increase coverage by 1.25%.
The diff coverage is 73.20%.

❗ Current head fa22c86 differs from pull request most recent head 03c2687. Consider uploading reports for the commit 03c2687 to get more accurate results

@@              Coverage Diff               @@
##           mampf-next     #453      +/-   ##
==============================================
+ Coverage       65.44%   66.69%   +1.25%     
==============================================
  Files             302      311       +9     
  Lines            8965     9350     +385     
==============================================
+ Hits             5867     6236     +369     
- Misses           3098     3114      +16     
Impacted Files Coverage Δ
app/helpers/lectures_helper.rb 35.18% <ø> (+0.18%) ⬆️
app/helpers/media_helper.rb 32.87% <0.00%> (+0.93%) ⬆️
app/models/manuscript.rb 19.81% <0.00%> (-0.28%) ⬇️
app/models/term.rb 68.57% <0.00%> (-7.15%) ⬇️
spec/controllers/media_controller_spec.rb 100.00% <ø> (ø)
app/models/item.rb 52.29% <20.00%> (-0.27%) ⬇️
app/models/user_cleaner.rb 22.38% <22.38%> (ø)
app/controllers/profile_controller.rb 23.47% <25.00%> (+0.05%) ⬆️
app/helpers/users_helper.rb 42.85% <25.00%> (-23.81%) ⬇️
app/helpers/search_helper.rb 50.00% <33.33%> (-25.00%) ⬇️
... and 24 more

... and 4 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

spec/cypress/e2e/courses_spec.cy.js Outdated Show resolved Hide resolved
docker/run_cypress_tests/docker-compose.yml Show resolved Hide resolved
docker/run_cypress_tests/Dockerfile_cypress Show resolved Hide resolved
docker/run_cypress_tests/docker-compose.local.yml Outdated Show resolved Hide resolved
spec/cypress/support/e2e.js Show resolved Hide resolved
@Splines
Copy link
Member

Splines commented Apr 11, 2023

Could you also refine the name of the workflow/jobs, so that it's better readable in the overview? E.g. for the unit tests, we now get:

image

You can do this by putting a name: ... up to the top of the file (here: "Unit tests") and add a name to the job (here: "Execute unit tests & upload to Codecov".


We should also think of when we need to run this action, e.g. put something along these lines in the beginning of the compose file:

name: Unit tests

on:
  push:
    branches:
      - main
      - mampf-next
      - production
      - experimental
  pull_request:

@Splines
Copy link
Member

Splines commented Apr 11, 2023

Ah nice, that's even better with no individual job name and only a global name in the docker compose file. Will do this for unit tests as well.

Edit: I have overlooked that the name of the job ("build") is still present in the name. That's why I just changed the naming to align with that of the unit tests workflow file, i.e. general name before the "/", after that a bit more detailed job description.

.github/workflows/unit-tests.yml Outdated Show resolved Hide resolved
@Splines
Copy link
Member

Splines commented Apr 11, 2023

Integration tests are currently timing out with message:

waiting for MaMpf to come online at http://mampf:3000

@henrixapp henrixapp marked this pull request as ready for review April 12, 2023 23:46
@henrixapp
Copy link
Collaborator Author

@Splines found the bug, the test adapter env was set to postgresql:13, which is not a valid name in database.yml, in a commit in mampf-next. I rebased to mampf-next. The checkmark for the e2e test is now ✅.

I would fix the linter pipeline in a separate pull request.

@Splines
Copy link
Member

Splines commented Apr 14, 2023

found the bug, the test adapter env was set to postgresql:13, which is not a valid name in database.yml, in a commit in mampf-next. I rebased to mampf-next. The checkmark for the e2e test is now ✅.

Ah wow, these are bugs we love, aren't they? 🙈😅 Thanks for fixing this.

I rebased to mampf-next.

What do you mean by that exactly? Is that the one force-push you made?

I would fix the linter pipeline in a separate pull request.

Awesome, had that in mind too, but if you tackle this, even better. I'm not that much of an CI/CD expert.
Ideally, the linter should reject every code that is not 100% to our standards we defined. It's then the task of every user to continuously lint locally.

@Splines
Copy link
Member

Splines commented Apr 14, 2023

image
Maybe put curl into silent mode again? Or change the sleep to like 2 or even 3 seconds?

@henrixapp
Copy link
Collaborator Author

henrixapp commented Apr 15, 2023

What do you mean by that exactly? Is that the one force-push you made?

I based the changes on mampf-next, not your branch as before, so yes.

Or change the sleep to like 2 or even 3 seconds?

Increased.

There are some tests that are failing (due to some weird checks based on CSS classes and recent changes in mampf-next), I will not address these here.

@henrixapp henrixapp requested a review from Splines April 15, 2023 12:04
@henrixapp henrixapp merged commit e7f7829 into mampf-next Apr 17, 2023
@henrixapp henrixapp deleted the pipeline/e2e branch April 17, 2023 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD Continuous Integration / Continuous Delivery (aka pipeline stuff)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade Cypress
2 participants