Skip to content

fix(test): collect coverage without using bash #189

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

Merged
merged 1 commit into from
Apr 3, 2025

Conversation

dmehala
Copy link
Contributor

@dmehala dmehala commented Apr 3, 2025

Description

Recent versions of nginx:<VERSION>-alpine docker images does not have bash installed anymore making the collection of code coverage failing... and test failing. This remove the dependency on bash.

Base automatically changed from dmehala/chore/update-amazonlinux to master April 3, 2025 18:23
Recent versions of `nginx:x-alpine` docker images does not have `bash`
installed anymore making the collection of code coverage failing. This
remove the dependency on bash.
@dmehala dmehala force-pushed the dmehala/fix/alpine-bash branch from def55f8 to c32eb05 Compare April 3, 2025 18:25
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.26%. Comparing base (bcb891f) to head (c32eb05).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #189   +/-   ##
=======================================
  Coverage   70.26%   70.26%           
=======================================
  Files          47       47           
  Lines        6224     6224           
  Branches      882      882           
=======================================
  Hits         4373     4373           
  Misses       1423     1423           
  Partials      428      428           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dmehala dmehala marked this pull request as ready for review April 3, 2025 20:56
@dmehala dmehala requested a review from a team as a code owner April 3, 2025 20:56
@dmehala dmehala requested review from cataphract, dubloom and pablomartinezbernardo and removed request for a team April 3, 2025 20:56
"find",
"/tmp",
"-name",
"*.profraw",
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be simpler to just avoid process substitution and pass the files to tar on the command line:

tar_command = docker_compose_command(
    "exec",
    "-T",
    "--",
    "nginx",
    "sh",
    "-c",
    "find /tmp -maxdepth 1 -name '*.profraw' | xargs tar --transform='s@tmp/@@' -czf -",
)

Copy link
Contributor Author

@dmehala dmehala Apr 3, 2025

Choose a reason for hiding this comment

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

That's a possibility. It's clever, however, I am afraid not everyone can understand this command line, whereas python code is much more expressive.

EDIT: I did try using xargs but got piping issues IIRC or I probably did it wrong :/

@dmehala dmehala merged commit 6d80301 into master Apr 3, 2025
50 checks passed
@dmehala dmehala deleted the dmehala/fix/alpine-bash branch April 3, 2025 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants