exercism / exercism/configlet

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

Open
#824 0 comments 0 reactions 0 assignees View on GitHub
kind: tests
Dominant language
Nim
Stars
23
Forks
17
Avg merge
13h 57m
Merged PRs (30d)
1

Description

### Description

With https://github.com/exercism/configlet/commit/66914845a323d2e21ab7d8b00b7219d0777f4c17, a configlet developer may see this error when running the integration tests locally:

```text
[Suite] generate
Author identity unknown

*** Please tell me who you are.

Run

git config --global user.email "you@example.com"
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:

https://github.com/exercism/configlet/blob/66914845a323d2e21ab7d8b00b7219d0777f4c17/.github/workflows/tests.yml#L40-L43

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.