-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (44 loc) · 1.49 KB
/
Copy pathunit_tests.yml
File metadata and controls
55 lines (44 loc) · 1.49 KB
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
name: Codi unit tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
node-tests:
name: Node.js Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install Dependencies
run: npm install
- name: Install Bun
run: npm install bun -g
- name: Run Node.js tests
run: node cli.js tests --returnResults
browser-tests:
name: Browser Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install Dependencies
run: npm install
- name: Install Chrome for Puppeteer
run: |
sudo apt-get update
sudo apt-get install -y wget gnupg
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 --fix-missing
- name: Run Browser tests
run: node cli.js tests --browser --returnResults
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
PUPPETEER_EXECUTABLE_PATH: /usr/bin/google-chrome-stable