-
Notifications
You must be signed in to change notification settings - Fork 4
36 lines (28 loc) · 854 Bytes
/
test.yml
File metadata and controls
36 lines (28 loc) · 854 Bytes
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
name: Run all tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
env:
APPLITOOLS_API_KEY: ${{ secrets.APPLITOOLS_API_KEY }}
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm ci
- name: Install matching ChromeDriver
run: |
CHROME_VERSION=$(google-chrome --version | grep -oP '\d+\.\d+\.\d+' | head -1)
CHROME_MAJOR_VERSION=$(echo "$CHROME_VERSION" | cut -d '.' -f 1)
echo "Detected Chrome version: $CHROME_VERSION (major: $CHROME_MAJOR_VERSION)"
npm install chromedriver@$CHROME_MAJOR_VERSION
- name: Run tests
run: npm run test:ci