Skip to content

[mustache_template] Add CI for test/all.dart #174721

@stuartmorgan-g

Description

@stuartmorgan-g

The mustache_template package contains a test/all.dart file, which is supposed to validate the package against upstream mustache specs. The original package had a shell script intended to run in CI that would:

  • git clone https://github.com/mustache/spec.git test/spec
  • dart test/all.dart

That script hasn't run in many, many years. As of our import of the package, when I ran that test locally it had about 40 failures. I'm not sure whether those were failing at the time, or whether they are spec files that have been added upstream since anyone was actively maintaining the package.

We should either:

  • make a version of that script via the repo tooling's custom test system (a Dart script to run arbitrary tests), but pulling a specific hash of the spec to avoid out-of-band failures when things change upstream, or
  • check in a copy of the relevant test data (along with metadata about the version pulled, and how to update it), and rename all.dart to something ending in _test.dart so that it runs as a normal test.

Either way, we should have docs about how to update the test specs. I don't think we need to try to set up an auto-roller for this given that our usage of the package is straightforward; on-demand updates would be fine as long as they are easy to do.

As part of setting that up, we will need to add a way of skipping the tests that don't currently work, and file a tracking issue for fixing them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectp: mustache_templateThe mustache_template packagepackageflutter/packages repository. See also p: labels.team-ecosystemOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions