diff --git a/.github/workflows/testdriver.yml b/.github/workflows/testdriver.yml new file mode 100644 index 0000000..fd3f562 --- /dev/null +++ b/.github/workflows/testdriver.yml @@ -0,0 +1,31 @@ +name: TestDriver.ai + +on: + push: + branches: ["main"] + pull_request: + workflow_dispatch: + +jobs: + test: + name: "TestDriver" + runs-on: ubuntu-latest + steps: + - uses: testdriverai/action@main + with: + key: ${{secrets.TESTDRIVER_API_KEY}} + prompt: | + 1. /run testdriver/test.yml + prerun: | + cd $env:TEMP + npm init -y + npm install dashcam-chrome + cd C:\actions-runner\_work\testdriver\testdriver + npm install + react-scripts start + Start-Process "C:/Program Files/Google/Chrome/Application/chrome.exe" -ArgumentList "--start-maximized", "--load-extension=$(pwd)/node_modules/dashcam-chrome/build", "${{ env.WEBSITE_URL }}" + exit + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + FORCE_COLOR: "3" + WEBSITE_URL: "http://localhost:3000" # Define the website URL here \ No newline at end of file diff --git a/.testdriver/prerun.sh b/.testdriver/prerun.sh deleted file mode 100644 index 748e4ff..0000000 --- a/.testdriver/prerun.sh +++ /dev/null @@ -1,7 +0,0 @@ -cd /Users/ec2-user/actions-runner/_work/testdriver/testdriver/.testdriver/ -npm install -npm start -npm install dashcam-chrome --save -/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --start-maximized --load-extension=./node_modules/dashcam-chrome/build/ 1>/dev/null 2>&1 & -sleep 20 -exit