Skip to content

[CI] mono_repo GitHub workflow setup with Coveralls #10

@dcharkes

Description

@dcharkes

We currently have two workflows, one for each package.

We should consider merging them into a single workflow using a matrix.

Pros:

Cons:

  • If we have packages that don't depend on each other, I don't know how to skip them.
    • (For now, I want to run the CI for native_assets_cli and c_compiler on PRs to both packages anyway. c_compiler immediately imports native_assets_cli, and the example in native_assets_cli imports c_compiler.)
  • Coverage badge is per whole repo, not per package.
    • (Current setup makes the coverage for a single package and ignoring the other.)

Possibly there is a way to let coveralls combine the results from multiple jobs.
https://pub.dev/packages/mono_repo seems to indicate some support, but I'm not sure how to map that to the current workflows.
None of the listed mono_repo packages on the package documentation actually have coverage (badges).

(Slightly off-topic: Another thing to consider is to not split jobs at all, the packages need the same dependencies installed to run, installing those deps takes time as well.)

edit: trying to switch Coveralls to monorepo:

image

job list: https://coveralls.io/repos/400800/builds

edit 2: Having merged the last PR to main, I can see two builds for main:

Both of them report the correct coverage for the respective packages, but they are not aggregated correctly.

Based on https://github.com/marketplace/actions/coveralls-github-action, maybe it would work if we do a carryforward. (The next question then is if we can get badges for the individual packages.)

edit 3: trying to see what mono_repo generate would do as configuration: https://gist.github.com/dcharkes/338f175398ed0300151b5aa48ea3f878

Also a single file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-infraA repository infrastructure change or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions