Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
run: |
npm install
npx ncc build index.js
cp cleanup.sh dist/
if [[ -n $(git status --porcelain) ]]; then
echo "Repo is dirty";
git status --porcelain;
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: setup-xvfb
name: run-with-xvfb
description: "Run your headless tests with XVFB"
branding:
icon: monitor
Expand Down
13 changes: 13 additions & 0 deletions dist/cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

kill_xvfb () {
local xvfb_pids=`ps aux | grep tmp/xvfb-run | grep -v grep | awk '{print $2}'`
if [ "$xvfb_pids" != "" ]; then
echo "Killing the following xvfb processes: $xvfb_pids"
sudo kill $xvfb_pids
else
echo "No xvfb processes to kill"
fi
}

kill_xvfb
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "setup-xvfb",
"name": "run-with-xvfb",
"version": "1.0.0",
"description": "Run your tests headlessly",
"main": "index.js",
Expand Down