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

[ci] Enable more tests in Cirrus #1726

Merged
merged 7 commits into from
May 4, 2022

Conversation

stuartmorgan
Copy link
Contributor

@stuartmorgan stuartmorgan commented May 3, 2022

This brings the Cirrus configuration more in line with flutter/plugins,
to reduce testing diffs between the two repositories:

  • Updates naming and grouping comments to match flutter/plugins to make
    them easier to compare.
  • Enables building examples on all platforms. This was being done for
    Android, and iOS, and Windows, but not Linux, macOS, or web, which
    wasn't an intentional mismatch.
  • Enables 'flutter drive' tests for web.
    • Does not enable them for other platforms as currently there is no
      need for them, and setup is non-trivial on some platforms (FTL
      secrets for Android, new Dockerfile dependencies for Linux).
  • Enables native unit tests for all platforms. (In practice this is a
    no-op at the moment, but it's a very fast no-op that doesn't
    require extra setup.)

These CI configurations come almost directly from flutter/plugins.

Supporting changes:

  • Rolls repo tooling forward to pick up support for drive-examples in
    non-plugin packages, and for running Dart unit tests in examples.
  • Copies the install_chromium.sh script from flutter/plugins to
    support web drive-examples, and moves the existing version for
    benchmarks to a different name with a TODO to merge them.
  • Removes unsupported platforms from rfw/example/wasm so
    that CI doesn't try to build them.
  • Adds Linux desktop dependencies to the Dockerfile.
  • Removes unnecessary libraries from flutter_markdown's
    Linux example, which came from an old template, as we no longer
    tell people to install those libraries in our documentation.

Fixes flutter/flutter#102851

No CHANGELOG change: The tweaked tests in pointer_interceptor don't need a CHANGELOG entry, since that's temporary code that will be removed once the current flutter master rolls into stable.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

This brings the Cirrus configuration more in line with flutter/plugins,
to reduce testing diffs between the two repositories:
- Updates naming and grouping comments to match flutter/plugins to make
  them easier to compare.
- Enables building examples on all platforms. This was being done for
  Android, and iOS, and Windows, but not Linux, macOS, or web, which
  wasn't an intentional mismatch.
- Enables 'flutter drive' tests for web.
  - Does not enable them for other platforms as currently there is no
    need for them, and setup is non-trivial on some platforms (FTL
    secrets for Android, new Dockerfile dependencies for Linux).
- Enables native unit tests for all platforms. (In practice this is a
  no-op at the momement, but it's a very fast no-op that doesn't
  require extra setup.)

Rolls repo tooling forward to pick up support for `drive-examples` in
non-plugin packages, and for running Dart unit tests in examples.

Fixes flutter/flutter#102851
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@stuartmorgan
Copy link
Contributor Author

@yjbanov @ditman Can the recent change to pointer_interceptor's tests be made in a way that works for both stable and master, or do we need to stop testing stable for that package for now? Currently we can't turn on package example tests because it fails on stable: https://cirrus-ci.com/task/5694692015734784

@ditman
Copy link
Member

ditman commented May 3, 2022

Can the recent change to pointer_interceptor's tests be made in a way that works for both stable and master

Checking.

@ditman
Copy link
Member

ditman commented May 3, 2022

(Note that we've marked this test as ignored in g3, so it might not be trivial :))

@ditman
Copy link
Member

ditman commented May 3, 2022

Hacky tweak that should enable this, here:

#1731

(I can push those changes into this branch, so we can land both at once?)

Copy link
Member

@ditman ditman left a comment

Choose a reason for hiding this comment

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

If CI passes here, let's merge this so we get more testing going!

@fluttergithubbot
Copy link

This pull request is not suitable for automatic merging in its current state.

  • The status or check suite publishable has failed. Please fix the issues identified (or deflake) before re-applying this label.

@ditman
Copy link
Member

ditman commented May 3, 2022

/cc @stuartmorgan it seems the tool is not picking up updates to the PR text? publishable insists that we need a "No CHANGELOG change: XYZ" (but I added it?)

@stuartmorgan
Copy link
Contributor Author

/cc @stuartmorgan it seems the tool is not picking up updates to the PR text? publishable insists that we need a "No CHANGELOG change: XYZ" (but I added it?)

You have to re-push after updating the PR text; there's some sort of cache of the description happening at the GitHub or Cirrus level if you just re-run. It's super annoying.

@stuartmorgan stuartmorgan deleted the enable-more-tests branch May 4, 2022 01:27
@ditman
Copy link
Member

ditman commented May 4, 2022

You have to re-push after updating the PR text; there's some sort of cache of the description happening at the GitHub or Cirrus level if you just re-run. It's super annoying.

Argh, I added an unnecessary CHANGELOG entry then. Luckily we'll be able to remove it when we undo the code. Thanks for the info!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable more tests in flutter/packages
3 participants