Skip to content

Commit df73415

Browse files
authored
Add CI workflow for tests (#2)
* Add initial test workflow * Move test workflow to new directory * Use xvfb for graphic tests
1 parent ef18ac5 commit df73415

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/tests.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build and Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v2
18+
19+
- name: Set up Node.js
20+
uses: actions/setup-node@v2
21+
with:
22+
node-version: '20'
23+
24+
- name: Install dependencies
25+
run: yarn install
26+
27+
- name: Set up Xvfb
28+
run: |
29+
sudo apt-get update
30+
sudo apt-get install -y xvfb
31+
Xvfb :99 -screen 0 1920x1080x24 &
32+
echo "DISPLAY=:99" >> $GITHUB_ENV
33+
34+
- name: Run ESLint
35+
run: yarn eslint src
36+
37+
- name: Run tests
38+
run: yarn test

0 commit comments

Comments
 (0)