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

C3: Add e2e coverage for deployment #3658

Merged
merged 5 commits into from
Jul 27, 2023
Merged

C3: Add e2e coverage for deployment #3658

merged 5 commits into from
Jul 27, 2023

Conversation

jculvey
Copy link
Contributor

@jculvey jculvey commented Jul 21, 2023

Adds e2e coverage for the deployment bits of c3

What this PR solves / how to test:

Associated docs issue(s)/PR(s):

  • [insert associated docs issue(s)/PR(s)]

Author has included the following, where applicable:

Reviewer is to perform the following, as applicable:

  • Checked for inclusion of relevant tests
  • Checked for inclusion of a relevant changeset
  • Checked for creation of associated docs updates
  • Manually pulled down the changes and spot-tested

@jculvey jculvey requested review from a team as code owners July 21, 2023 18:28
@changeset-bot
Copy link

changeset-bot bot commented Jul 21, 2023

⚠️ No Changeset found

Latest commit: 1845864

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codecov
Copy link

codecov bot commented Jul 21, 2023

Codecov Report

Merging #3658 (1845864) into main (ccc19d5) will increase coverage by 0.10%.
Report is 5 commits behind head on main.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3658      +/-   ##
==========================================
+ Coverage   74.98%   75.08%   +0.10%     
==========================================
  Files         194      195       +1     
  Lines       11301    11351      +50     
  Branches     2977     2999      +22     
==========================================
+ Hits         8474     8523      +49     
- Misses       2827     2828       +1     

see 12 files with indirect coverage changes

Copy link
Member

@dario-piotrowicz dario-piotrowicz left a comment

Choose a reason for hiding this comment

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

Looks good to me 😃

One thing I am not sure about are the strings you chose for testing the deployments, they seem a bit small to me and potentially a bit unreliable (can those be for example be present also in error pages? like Create Next App?)

On the other hand you wouldn't want them to be long and brittle/flaky, so I get that
(maybe the could be turned to more flexible and reliable regexes if need be? not necessarily right now, I don't want you to overengineer things on my account)

Anyways I trust your judgment 😄

.github/workflows/test-c3.yml Outdated Show resolved Hide resolved
packages/create-cloudflare/e2e-tests/pages.test.ts Outdated Show resolved Hide resolved
packages/create-cloudflare/e2e-tests/pages.test.ts Outdated Show resolved Hide resolved
Copy link
Member

@dario-piotrowicz dario-piotrowicz left a comment

Choose a reason for hiding this comment

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

thanks a lot for the changes, awesome stuff 😄

@github-actions
Copy link
Contributor

github-actions bot commented Jul 26, 2023

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/5685523545/npm-package-wrangler-3658

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/5685523545/npm-package-wrangler-3658

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/5685523545/npm-package-wrangler-3658 dev path/to/script.js
Additional artifacts:
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/5685523545/npm-package-cloudflare-pages-shared-3658

Note that these links will no longer work once the GitHub Actions artifact expires.

packages/create-cloudflare/e2e-tests/pages.test.ts Outdated Show resolved Hide resolved
@@ -157,7 +157,7 @@ const config: FrameworkConfig = {
"--src-dir",
"--app",
"--import-alias",
'"@/*"',
"@/*",
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this not required to ensure that weird paths don't get expanded improperly?

@jculvey jculvey merged commit ade600c into main Jul 27, 2023
13 checks passed
@jculvey jculvey deleted the c3-deploy-tests branch July 27, 2023 21:36
lrapoport-cf pushed a commit that referenced this pull request Aug 11, 2023
* C3: Add e2e coverage for deployment

* PR feedback

* Adding cleanup script for test projects

* C3: Run framework e2e tests concurrently

* Fixing project cleanup and tweaking test concurrency
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 this pull request may close these issues.

3 participants