Skip to content

Commit

Permalink
tests: configure git identity
Browse files Browse the repository at this point in the history
The integration tests fail when the user running the tests
does not have a ~/.config/git/config configured with their identity.

Configure user.name and user.email to correct the "git commit" step.
This fixes running tests on NixOS under `nixbld` where $HOME is sandboxed.

Closes: #21
Reported-by:  Jordi Carrillo <[email protected]>
  • Loading branch information
davvid committed Jan 13, 2024
1 parent 2c06493 commit a638f36
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ tests:
stage: test
image: rust
script:
- git config --global user.name Garden
- git config --global user.email [email protected]
- git config --global init.defaultBranch main
- garden -vv test

checks:
Expand Down
3 changes: 3 additions & 0 deletions tests/integration/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ main () {
(
cd "./$1"
git init --quiet
git config user.name Garden
git config user.email [email protected]
git config init.defaultBranch garden
git commit --quiet --allow-empty -m'Root directory'
mkdir -p repos
# Create repos/example.git
Expand Down

0 comments on commit a638f36

Please sign in to comment.