mirror of
https://forgejo.stefka.eu/jiriks74/create-pull-request.git
synced 2025-01-18 16:01:06 +01:00
Add integration testing
This commit is contained in:
parent
172ec762f8
commit
498d78cb23
5 changed files with 85 additions and 14 deletions
29
__test__/entrypoint.sh
Executable file
29
__test__/entrypoint.sh
Executable file
|
@ -0,0 +1,29 @@
|
|||
#!/bin/sh -l
|
||||
set -euo pipefail
|
||||
|
||||
# Save the working directory
|
||||
WORKINGDIR=$PWD
|
||||
|
||||
# Serve remote repo
|
||||
mkdir /git
|
||||
git init --bare /git/test-repo.git
|
||||
git daemon --verbose --enable=receive-pack --base-path=/git --export-all /git/test-repo.git &>/dev/null &
|
||||
|
||||
# Give the daemon time to start
|
||||
sleep 2
|
||||
|
||||
# Clone and make an initial commit
|
||||
git clone git://127.0.0.1/test-repo.git /git/test-repo
|
||||
cd /git/test-repo
|
||||
git config --global user.email "you@example.com"
|
||||
git config --global user.name "Your Name"
|
||||
echo "#test-repo" > README.md
|
||||
git add .
|
||||
git commit -m "initial commit"
|
||||
git push -u
|
||||
|
||||
# Restore the working directory
|
||||
cd $WORKINGDIR
|
||||
|
||||
# Execute integration tests
|
||||
jest int
|
Loading…
Add table
Add a link
Reference in a new issue