-
Notifications
You must be signed in to change notification settings - Fork 60
37 lines (33 loc) · 1.27 KB
/
tests.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
name: Continuous Integration
on:
push:
branches: [ master, pp/chrome-driver-integration-failure ]
pull_request:
branches: [ master, pp/chrome-driver-integration-failure ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
- uses: browser-actions/setup-chrome@latest
with:
chrome-version: latest
- name: Download ChromeDriver
run: |
# Get the Chrome version
CHROME_VERSION=$(google-chrome --version | grep -oP '\d+\.\d+\.\d+')
# Get the ChromeDriver version that matches the Chrome version
CHROMEDRIVER_VERSION=$(curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_VERSION)
# Download and unzip the ChromeDriver
curl -sS -o /tmp/chromedriver.zip "http://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip"
unzip -q /tmp/chromedriver.zip -d /tmp
# Move ChromeDriver to a location in PATH
sudo mv /tmp/chromedriver /usr/local/bin/chromedriver
sudo chmod +x /usr/local/bin/chromedriver
- run: npm ci
- run: npx grunt
- run: npm test