Skip to content

Formatter repeating output (Github Actions) #639

@polarathene

Description

@polarathene

Describe the bug

Attempted to use the --pretty formatter in Github Actions CI. I referenced usage of TERM: linux used in this projects own GHA workflows, but I'm getting a weird mix of pretty and tap output?

Screenshot_20220822_211541

To Reproduce

Relevant step in CI workflow to run bats:

- name: 'Run tests'
    env:
      TERM: linux
    run: |
      # Calls bats via make if that makes a difference,
      # The `bash -c` isn't likely necessary and was contributed by another user prior:
      bash -c 'make generate-accounts tests'

Makefile runs bats with the following:

./test/bats/bin/bats --timing --pretty test/*.bats

Expected behavior

Output similar to using the pretty formatter locally. Not repeated content.

Environment (please complete the following information):

  • Bats Version: 1.7
  • OS: Ubuntu 20.04 (Github CI runner)
  • Bash version: ? (Not sure, but equivalent to bats-core workflow)

Additional context

Regular tap worked fine without --pretty. Enabling --pretty failed due to lack of $TERM, checked bats-core project for related issues/solutions to find TERM: linux.

If this is an issue with Github CI not capable of supporting --pretty that's fine 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: Bash CodeEverything regarding the bash codePriority: HighBroken behavior in specific environments like in parallel mode or only on some operating systemsStatus: ConfirmedThe reproducer worked as describedType: Bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions