garden icon indicating copy to clipboard operation
garden copied to clipboard

Test command shows different behaviors when using artifacts

Open anna-yn opened this issue 4 years ago • 2 comments

Bug

Current Behavior

I have some jest tests in my repo and I noticed that running with artifacts makes jest behave differently. Without artifacts, when I run tests with this config:

tests:
  - name: modules
    command: ['yarn']
    args:
      - jest
      - --silent

Jest would print out something like this for each file it ran:

PASS src/something.spec.ts

But when I add an artifacts block (which copies over the right artifacts just fine):

    artifacts:
      - source: /frontend/junit-jest-modules.xml
        target: modules-result

Jest would run without those outputs, even ignoring options like --verbose.

Expected behavior

Jest should behave the same way with or without the artifacts block specified in tests.

Reproducible example

I might try come up with a short example later. I'm using: yarn: 1.12.3 jest: ^26.6.3

Workaround

I haven't found a workaround for this yet. Right now I'd need to choose between seeing the test results in console log in each job or only see aggregated results produced with the artifacts.

Suggested solution(s)

Additional context

Your environment

  • OS: linux
  • How I'm running Kubernetes: AKS

garden version 0.12.28

anna-yn avatar Oct 27 '21 05:10 anna-yn

Hi @anna-yn, thanks for reporting this. It does look like a bug, we'll try to reproduce it and let you know once it's fixed and if we have a workaround in the meantime.

10ko avatar Oct 29 '21 14:10 10ko

Assigning @thsig, feel free to reassign.

10ko avatar Oct 29 '21 14:10 10ko

This was fixed a while ago. Closing this. Feel free to reopen if it's still and issue in the latest Garden versions.

vvagaytsev avatar Jul 04 '23 11:07 vvagaytsev