Skip to content

Commit e60b1cb

Browse files
committed
Add GitHub Action CI
1 parent f1c8eeb commit e60b1cb

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/build-test.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
schedule:
9+
- cron: "35 23 * * 5"
10+
11+
jobs:
12+
build-and-test:
13+
name: Build and Test
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
# Node.js 10 has been deprecated since May 2020
20+
# Node.js 12 has been deprecated since Oct 2020
21+
# Node.js 14 has been deprecated since Oct 2021
22+
# Node.js 15 has been deprecated since Apr 2021
23+
nodejs_version: [16, 18]
24+
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v3
28+
29+
- name: Install Node.js
30+
uses: actions/setup-node@v3
31+
with:
32+
node-version: ${{ matrix.nodejs_version }}
33+
cache: 'yarn'
34+
35+
36+
- name: Initialize
37+
shell: bash
38+
# export DISPLAY=':99.0'
39+
# usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
40+
run: yarn
41+
42+
- name: Test for Linux
43+
if: runner.os == 'Linux'
44+
shell: bash
45+
run: xvfb-run -a yarn run test
46+
47+
- name: Test for else
48+
if: runner.os != 'Linux'
49+
shell: bash
50+
run: yarn run test

0 commit comments

Comments
 (0)