-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (45 loc) · 1.54 KB
/
build-trunk.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: CI trunk
on:
push:
branches:
- trunk
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Chrome
uses: browser-actions/setup-chrome@latest
- name: Download and setup ChromeDriver
run: |
CHROME_VERSION=$(google-chrome-stable --version | cut -d ' ' -f3) &&
CHROMEDRIVER_VERSION=$(curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_VERSION") &&
curl -LO "https://chromedriver.storage.googleapis.com/100.0.4896.60/chromedriver_linux64.zip" &&
unzip chromedriver_linux64.zip &&
sudo mv chromedriver /usr/local/bin/ &&
sudo chmod +x /usr/local/bin/chromedriver
- name: Install server dependencies
run: npm ci
working-directory: server
- name: Start server
run: |
npm start &
sleep 10
working-directory: server
env:
NODE_ENV: test
TEST_MONGODB_URI: ${{ secrets.TEST_MONGODB_URI }}
TEST_ALLOWED_ORIGIN: ${{secrets.TEST_ALLOWED_ORIGIN}}
- name: Run server tests
run: npm test
working-directory: server
env:
NODE_ENV: test
TEST_MONGODB_URI: ${{ secrets.TEST_MONGODB_URI }}
TEST_ALLOWED_ORIGIN: ${{secrets.TEST_ALLOWED_ORIGIN}}
- name: Install client dependencies
run: npm ci
working-directory: client
# - name: Run client tests
# run: npm test
# working-directory: client