-
-
Notifications
You must be signed in to change notification settings - Fork 56
44 lines (41 loc) · 1.44 KB
/
functional-test.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
name: Functional Tests
on: [pull_request]
jobs:
test:
env:
CI: 1
DISPLAY: :99
_FORCE_LOGS: 1
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: lts/*
- run: |
export CHROME_VERSION=$(google-chrome --version | python -c "import sys, re; print(re.search(r'[0-9.]+', sys.stdin.read()).group(0))")
echo "Version number of the installed Chrome browser: $CHROME_VERSION"
export MAJOR_CHROME_VERSION=$(python -c "print('.'.join('$CHROME_VERSION'.split('.')[:-1]))")
echo "Major part of the version number: $MAJOR_CHROME_VERSION"
if grep -q "$MAJOR_CHROME_VERSION" config/mapping.json; then
export CHROMEDRIVER_VERSION=$(grep -m 1 -n "$MAJOR_CHROME_VERSION" config/mapping.json | cut -d' ' -f4 | tr -d ',"')
echo "Matching Chromedriver version: $CHROMEDRIVER_VERSION"
fi
npm install
name: Install dev dependencies
- run: |
sudo Xvfb -ac $DISPLAY -screen 0 1280x1024x24 > /dev/null 2>&1 &
npm run e2e-test
name: Run functional tests
windows_test:
env:
WIN_CD_VERSION: "88.0.4324.96"
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: lts/*
- run: npm install --chromedriver_version=${{ env.WIN_CD_VERSION }}