Skip to content
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

tests(binary): error when git email auto-detection is disabled #824

Open
ee7 opened this issue Oct 6, 2023 · 0 comments
Open

tests(binary): error when git email auto-detection is disabled #824

ee7 opened this issue Oct 6, 2023 · 0 comments
Labels
kind: tests Adding or refactoring tests

Comments

@ee7
Copy link
Member

ee7 commented Oct 6, 2023

Description

With 6691484, a configlet developer may see this error when running the integration tests locally:

[Suite] generate
Author identity unknown

*** Please tell me who you are.

Run

  git config --global user.email "[email protected]"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: no email was given and auto-detection is disabled

Error when running `git -C /home/foo/exercism-configlet/tests/.test_elixir_track_repo commit -a -m config: convert `average_run_time` to int`
/home/foo/exercism-configlet/tests/test_binary.nim(1446) test_binary
/home/foo/exercism-configlet/tests/test_binary.nim(1440) main
/home/foo/exercism-configlet/tests/test_binary.nim(946) testsForGenerate
/home/foo/exercism-configlet/src/exec.nim(137) setupExercismRepo
/home/foo/exercism-configlet/src/exec.nim(123) fixAverageRunTimeInConfigJson
/home/foo/exercism-configlet/src/exec.nim(76) gitCheck
/home/foo/exercism-configlet/src/exec.nim(68) execAndCheck
Error: unhandled exception:  [OSError]

Possible solution

Move this logic from the workflow to the test file, and make it run conditionally:

- name: Configure the git user # Required to create a commit in our binary tests
run: |
git config --global user.email "[email protected]"
git config --global user.name "Exercism Bot"

@ee7 ee7 added the kind: tests Adding or refactoring tests label Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: tests Adding or refactoring tests
Projects
None yet
Development

No branches or pull requests

1 participant