-
Notifications
You must be signed in to change notification settings - Fork 709
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
Test fixups & skip tests for docs changes #6770
Conversation
|
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/11124819674/npm-package-wrangler-6770 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/6770/npm-package-wrangler-6770 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11124819674/npm-package-wrangler-6770 dev path/to/script.js Additional artifacts:npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11124819674/npm-package-create-cloudflare-6770 --no-auto-update npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11124819674/npm-package-cloudflare-kv-asset-handler-6770 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11124819674/npm-package-miniflare-6770 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11124819674/npm-package-cloudflare-pages-shared-6770 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11124819674/npm-package-cloudflare-vitest-pool-workers-6770 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11124819674/npm-package-cloudflare-workers-editor-shared-6770 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11124819674/npm-package-cloudflare-workers-shared-6770 Note that these links will no longer work once the GitHub Actions artifact expires.
Please ensure constraints are pinned, and |
@@ -14,7 +14,7 @@ jobs: | |||
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.node }} | |||
cancel-in-progress: true | |||
timeout-minutes: 40 | |||
if: github.repository_owner == 'cloudflare' && (github.event_name != 'pull_request' || (github.event_name == 'pull_request' && contains(github.event.*.labels.*.name, 'e2e' ))) | |||
if: (github.event_name != 'pull_request' || (github.event_name == 'pull_request' && contains(github.event.*.labels.*.name, 'e2e' ) && github.event.pull_request.head.repo.owner.login == 'cloudflare')) |
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.
Turns out repository_owner
is always cloudflare
, even for forks
|
||
jobs: | ||
add-to-project: | ||
if: github.ref != 'refs/heads/changeset-release/main' | ||
if: github.head_ref != 'changeset-release/main' |
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.
Turns out github.ref
for pull_request
events refers to the pull request ref (e.g. refs/6770/merge
)
.github/workflows/test-and-check.yml
Outdated
os: [ubuntu-latest, windows-latest, macos-13] | ||
filter: ["./fixtures/*"] | ||
runs-on: ${{ matrix.os }} | ||
if: github.head_ref == 'changeset-release/main' || contains(github.event.*.labels.*.name, 'fixtures' ) |
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.
This is the pertinent change—only run fixtures if the fixtures label is applied
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.
Can we auto-apply this label under certain circumstances?
eg. when the fixtures dir has been touched, when wrangler/src has been touched, etc
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.
- uses: dorny/paths-filter@v3 | ||
id: changes | ||
with: | ||
filters: | | ||
everything_but_markdown: | ||
- '!**/*.md' | ||
|
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 run the remaining tests if a non-markdown file was changed, allowing e.g. README fixes to be light on CI time
This reverts commit a9002d6.
I think this is dangerous. There are a lot of very useful tests in fixtures that actually test significant functionality. |
They're also really flaky, though. In most cases (especially from forks where the turbo cache isn't available) I think any signal in fixtures is lost to the noise of flakes. We'll still be running them on Version Packages, so we won't be releasing with fixture failures. Of course, this might end up in loads of things needing to be reverted/fixed in Version Packages, but if that's the case we can revisit things—it seems like it's worth a try to make opening PRs and contributing smoother? |
Could we then only skip the flaky ones if this label is not applied? |
And keep the rest running? That could work |
// @ts-expect-error This is a JS file | ||
import { getNextMiniflareVersion } from "../../../.github/changeset-version"; |
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.
you should be able to import js from ts
What this PR solves / how to test
Fixes #6685
Author has addressed the following