-
Notifications
You must be signed in to change notification settings - Fork 5
77 lines (72 loc) · 2.97 KB
/
push-actions.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# GitHub Actions for CI/CD
name: Automated Tests on Git Push
on: push
jobs:
# An automated check that runs the ESLint scan
eslint:
name: Run ESLint scan
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "20.15.0"
cache: "npm"
- name: Install X11 dependencies for robotjs (needed for unit testing on input-mask tests)
run: sudo apt-get install libxtst-dev libpng++-dev xvfb
- name: Install npm dependencies
run: npm ci
- name: Run ESLint
run: npm run eslint
# An automated check that runs all of the accessibility and unit tests
tests:
name: Run Automated tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "20.15.0"
cache: "npm"
- name: Set up JDK 11 for x64
uses: actions/setup-java@v4
with:
java-version: "11"
distribution: "temurin"
architecture: x64
- name: Install Lynx dependency
run: sudo apt install lynx
- name: Install PHP8.1
run: sudo apt install php8.1
- name: Install latest Chrome to match chromedriver package version
# Note: you should see if the version of Chrome matches the latest listed on
# https://mirror.cs.uchicago.edu/google-chrome/pool/main/g/google-chrome-stable/
run: |
apt search '^google-chrome.*' \
&& wget -q -O /tmp/chrome.deb http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_130.0.6723.58-1_amd64.deb \
&& sudo apt install -y /tmp/chrome.deb --allow-downgrades \
&& rm /tmp/chrome.deb
- name: Log system details
run: |
uname &&
echo $OSTYPE &&
which google-chrome &&
google-chrome --version
- name: Install X11 dependencies for robotjs (needed for unit testing on input-mask tests)
run: sudo apt-get install libxtst-dev libpng++-dev xvfb
- name: Install npm dependencies
run: npm ci
- name: Start server and wait for localhost to be available
run: |
npm run start &
sleep 10 &&
curl http://localhost:8888
- name: Run automation tests
run: |
export DISPLAY=:99
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
npm run test