-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Track and stop running processes to make it easier to run Playwright …
…in dev (#3098)
- Loading branch information
Showing
8 changed files
with
42 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
vite: cd demo; bin/vite dev | ||
css: cd demo; npm run build:css -- --watch | ||
vite: cd demo; script/start-vite | ||
css: cd demo; script/start-css | ||
web: cd demo; bin/rails s -p 4000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#! /bin/bash | ||
|
||
echo $$ > tmp/pids/css.pid | ||
exec npm run build:css -- --watch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#! /bin/bash | ||
|
||
echo $$ > tmp/pids/vite.pid | ||
exec bin/vite dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#! /bin/bash | ||
|
||
./script/stop-existing-processes | ||
exec npx playwright test --workers 6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#! /bin/bash | ||
|
||
overmind stop | ||
rm .overmind.sock | ||
|
||
pidfiles=(demo/tmp/pids/css.pid demo/tmp/pids/vite.pid demo/tmp/pids/server.pid) | ||
|
||
for pidfile in "${pidfiles[@]}" | ||
do | ||
if [ -f $pidfile ]; then | ||
pid=$(cat $pidfile) | ||
name=$(basename "$pidfile" .pid) | ||
echo "Stopping existing $name process with pid $pid" | ||
kill -9 $pid | ||
rm $pidfile | ||
fi | ||
done |