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

Fix e2e issues #4759

Closed
fvictorio opened this issue Jan 12, 2024 · 0 comments · Fixed by #4785
Closed

Fix e2e issues #4759

fvictorio opened this issue Jan 12, 2024 · 0 comments · Fixed by #4785
Assignees
Labels
status:ready This issue is ready to be worked on type:chore A task related to code quality, tooling, CI, or anything that doesn't directly impact the end users

Comments

@fvictorio
Copy link
Member

fvictorio commented Jan 12, 2024

Our e2e tests have a several issues:

  • The shebangs are wrong
  • The temporary tests should be created outside the repository (for example, using mktemp -d, although I think /tmp is valid in the three runners used by the CI)
  • npx is always used, but it should only be used for npm. yarn and pnpm should use their own versions (which is just the same command; that is: npx hardhat, yarn hardhat and pnpm hardhat)
  • After fixing the shebangs, bash will be always used. This means that echo might not interpret \n (it doesn't do it in the CI nor on my machine), so we should use printf instead.
  • We should add an assertion that no spurious, empty files are created in the root of the project. This function should work I think:
no_empty_files() {
  for file in $(find . -maxdepth 1 -type f); do
    if [ ! -s $file ]; then
      echo "File $file is empty"
      exit 1
    fi
  done
}
  • Spend some time investigating why Windows e2e tests take way longer than Ubuntu e2e tests

When I fixed some of these things (not sure which one), the CI started failing for windows+pnpm, so we should look into that.

@github-actions github-actions bot added the status:ready This issue is ready to be worked on label Jan 12, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Hardhat Jan 12, 2024
@fvictorio fvictorio added type:chore A task related to code quality, tooling, CI, or anything that doesn't directly impact the end users status:ready This issue is ready to be worked on and removed status:ready This issue is ready to be worked on labels Jan 12, 2024
@fvictorio fvictorio moved this from Backlog to To-do in Hardhat Jan 12, 2024
@ChristopherDedominici ChristopherDedominici linked a pull request Jan 24, 2024 that will close this issue
@fvictorio fvictorio moved this from To-do to In Progress in Hardhat Jan 25, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Hardhat Feb 8, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:ready This issue is ready to be worked on type:chore A task related to code quality, tooling, CI, or anything that doesn't directly impact the end users
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants