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

Configure Github Actions to run e2e test suite #618

Closed
cafca opened this issue Sep 9, 2020 · 5 comments · Fixed by #533
Closed

Configure Github Actions to run e2e test suite #618

cafca opened this issue Sep 9, 2020 · 5 comments · Fixed by #533
Assignees

Comments

@cafca
Copy link
Collaborator

cafca commented Sep 9, 2020

What's the problem you want solved?

e2e test suite fails with an error

Error: ENOENT: no such file or directory, stat '/home/runner/.config/Cypress/cy/production/projects/fixmy.frontend-300f8763ba785a6660d5774a0d31cf3e/bundles/cypress/support/index.js'

See logs

@s-pic
Copy link
Collaborator

s-pic commented Sep 13, 2020

Problem analysis

  • fails at the last test

it works on my machine 😸

  • test are booting locally (they don't run through because they are not maintained, but they run through with passing and failing assertions)
  • sys specs (npx -p @storybook/cli sb info):
Environment Info:

  System:
    OS: Windows 10 10.0.18363
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  Binaries:
    Node: 12.16.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.5 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 6.13.4 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 85.0.4183.102
    Edge: Spartan (44.18362.449.0)

preceding step

@s-pic
Copy link
Collaborator

s-pic commented Sep 14, 2020

I followed the aproach to disable https://github.com/cypress-io/cypress-webpack-preprocessor in cypress/plugins/index.js, thinking that we don't really have to transform the cypress code, since it is written in plain js.
BUT we do import various configs files from the code we are e2e-testing, and cypress therefore needs to know about things like our aliases (~/config == src/config).
So that is not really an option.

@s-pic
Copy link
Collaborator

s-pic commented Sep 14, 2020

@cafca I only now realize that

  • e2e tests for each region run in parallel
  • each job crates a bundle under the same folder (the long nunber in the paths we have seen is not random)

That can't be good. E.g. we use Clean Webpack Plugin to clear the build folder before bundling.

image

Now everything makes sense.

We should either

  • run those tests one after another (Now I start looking into the Github Actions API, especially how the matrix strategy -- that we are using -- works)
  • adapt the webpack config passed to the Cypress file preprocessor. First appoaches coming to mind are
    • using a random build output path
    • not using Clean Webpack Plugin

*BTW: I updated cypress in the hope of getting better logs and bug fixes

@s-pic
Copy link
Collaborator

s-pic commented Sep 16, 2020

Found out that the long number we are seeing in the filepath is not defined by cypress-webpack-preprocessor. It is the "app data path" cypress puts files in (I'd need more research to express this more precisely). This path is system specific to a cypress installation an oes not change between CI runs.

image

Therefore I will try omitting CleanWebpackPlugin during CI runs.

@s-pic
Copy link
Collaborator

s-pic commented Sep 16, 2020

@cafca Using a seperate webpack config that does not use any plugins at all and passing it to the cypress webpack preprocessor seems to resolve our issue 😃
Cypress successfully boots for each region in the github ci matrix.
https://github.com/FixMyBerlin/fixmy.frontend/pull/533/checks?sha=b65b7f82f6d79710b4314d3ccceb19425c68c2a1

@cafca cafca closed this as completed Sep 17, 2020
@cafca cafca reopened this Nov 4, 2020
@cafca cafca transferred this issue from FixMyBerlin/fixmy.platform Nov 4, 2020
@cafca cafca closed this as completed Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants