Skip to content

Poly diff to list changed bases/components for CI testing #116

@BeRT2me

Description

@BeRT2me

Is your feature request related to a problem? Please describe.
poetry poly diff -s is an amazing tool for a CI environment, but when working in a large project where tests for components/bases can become rather extensive, it would be nice to be able to get a simple list of those which were updated as well. (Rather than having to run all tests)

Describe the solution you'd like
Something like:
poetry poly diff bases --> base1 base3
poetry poly diff components --> component2 component4

Describe alternatives you've considered
Maybe -s flag, and/or bases/components as flags rather than an argument.

Nice to have would be a list of test paths, so you could just run :

poetry run pytest `poetry poly diff --test-paths`

Additional context

# Test projects by using their self-defined dependencies.
for val in `poetry poly diff -s`
do
    poetry install --sync -C ./projects/${val}
    poetry install --only=dev
    for base in `poetry poly diff bases -C ./projects/${val}`
    do
        poetry run pytest ./test/proj/bases/${base}
    done
done

cd test/proj/components && poetry run pytest `poetry poly diff components`

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions