astronomer / astro-cli

CLI that makes it easy to create, test and deploy Airflow DAGs to Astronomer
https://www.astronomer.io
Other
359 stars 70 forks source link

astro dev pytest should be able to generate a codecov output #1142

Open frankcash opened 1 year ago

frankcash commented 1 year ago

✍️ Is your feature request related to a problem? Please describe.

No, just a feature gap. Currently you cannot use astro dev pytest to generate a coverage report

🧩 Describe the solution you'd like

Ability to use https://pytest-cov.readthedocs.io/en/latest/reporting.html if given flags were passed in to astro dev pytest cov-...

🤔 Describe alternatives you've considered

Is your feature request specific to a particular Astronomer Platform?

💡 Additional context

stuart23 commented 1 year ago

I don't believe this is solved as there is no way to eject the coverage report out of the running container.

To reproduce: astro dev pytest --args "--cov --cov-report xml"

frankcash commented 1 year ago

You can if you write it to the include directory On Wed, Jun 28, 2023 at 1:44 PM Stuart Buckingham @.***> wrote:

Reopened #1142 https://github.com/astronomer/astro-cli/issues/1142.

— Reply to this email directly, view it on GitHub https://github.com/astronomer/astro-cli/issues/1142#event-9667601748, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABN32R5D4G44TWKTGAHI43LXNRUORANCNFSM6AAAAAAWW2UJ3E . You are receiving this because you authored the thread.Message ID: @.***>

-- Charles Frank Cash OSS Programmer https://github.com/frankcash https://keybase.io/frankcash https://github.com/frankcash

frankcash commented 1 year ago

astro dev pytest --args "--junitxml=/usr/local/airflow/include/report.xml"

stuart23 commented 1 year ago

Great, I will put this in the docs. Would it make sense to mount a different directory for artifacts rather than use include?