name: TestDriver.ai
permissions:
actions: read
contents: read
statuses: write
pull-requests: write
on:
push:
branches: ["main"]
pull_request:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
test:
name: "TestDriver"
runs-on: ubuntu-latest
steps:
- uses: testdriverai/action@main
with:
key: ${{secrets.TESTDRIVER_API_KEY}}
prompt: |
1. Search for cat pictures
2. Download the first image to the desktop
3. Assert the cat picture is saved to the desktop
prerun: |
cd $env:TEMP
npm init -y
npm install dashcam-chrome
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: "https://example.com" # Define the website URL here