Skip to content

Commit

Permalink
Fix test dependency (git)
Browse files Browse the repository at this point in the history
  • Loading branch information
ymattw committed Jun 23, 2024
1 parent 785c9fd commit e895288
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ jobs:
options: --rm -v ${{ github.workspace }}:/workspace -w /workspace
run: |
set -o errexit
apk add --no-cache bash make
apk add bash make
make build
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ jobs:
options: --rm -v ${{ github.workspace }}:/workspace -w /workspace
run: |
set -o errexit
apk add --no-cache bash less make
python3 -m pip install -r requirements-dev.txt
apk add bash git less make
pip install -r requirements-dev.txt
make test
6 changes: 3 additions & 3 deletions tests/test_ydiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ def setUp(self):
self._cwd = os.getcwd()
self._ws = tempfile.mkdtemp(prefix='test_ydiff')
self._non_ws = tempfile.mkdtemp(prefix='test_ydiff')
cmd = ('cd %s; git init; git config user.name me; '
cmd = ('set -o errexit; cd %s; git init; git config user.name me; '
'git config user.email [email protected]') % self._ws
subprocess.call(cmd, shell=True, stdout=subprocess.PIPE)
self._change_file('init')
Expand All @@ -696,12 +696,12 @@ def tearDown(self):
subprocess.call(cmd)

def _change_file(self, text):
cmd = ['/bin/sh', '-c',
cmd = ['/bin/sh', '-ec',
'cd %s; echo "%s" > foo' % (self._ws, text)]
subprocess.call(cmd)

def _commit_file(self):
cmd = ['/bin/sh', '-c',
cmd = ['/bin/sh', '-ec',
'cd %s; git add foo; git commit foo -m update' % self._ws]
subprocess.call(cmd, stdout=subprocess.PIPE)

Expand Down

0 comments on commit e895288

Please sign in to comment.