-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (52 loc) · 1.69 KB
/
run-regressions.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: TestDriver.ai / Run / Regressions
on:
push:
branches: ["main"]
pull_request:
jobs:
gather-test-files:
name: Gather Test Files
runs-on: ubuntu-latest
outputs:
test_files: ${{ steps.test_list.outputs.files }}
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
ref: ${{ github.event.ref }}
- name: Find all test files and extract filenames
id: test_list
run: |
FILES=$(ls ./testdriver/*.yml)
FILENAMES=$(basename -a $FILES)
FILES_JSON=$(echo "$FILENAMES" | jq -R -s -c 'split("\n")[:-1]')
echo "::set-output name=files::$FILES_JSON"
test:
needs: gather-test-files
runs-on: ubuntu-latest
strategy:
matrix:
test: ${{ fromJson(needs.gather-test-files.outputs.test_files) }}
fail-fast: true
name: ${{ matrix.test }}
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
ref: ${{ github.event.ref }}
- name: Display filename being tested
run: |
echo "Running job for file: ${{ matrix.test }}"
- uses: testdriverai/action@main
with:
key: ${{ secrets.TESTDRIVER_API_KEY }}
prompt: 1. /run testdriver/${{ matrix.test }}
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"