-
-
Notifications
You must be signed in to change notification settings - Fork 14
57 lines (47 loc) · 1.55 KB
/
build-test.yaml
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
################################################################################################
# Copyright (c) Rowe Wilson Frederisk Holme. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
################################################################################################
---
name: Build
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
# schedule:
# - cron: "35 23 * * 5"
jobs:
build-and-test:
name: Build and Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Node.js 10 has been deprecated since May 2020
# Node.js 12 has been deprecated since Oct 2020
# Node.js 14 has been deprecated since Oct 2021
# Node.js 15 has been deprecated since Apr 2021
# Node.js 16 has been deprecated since Oct 2023
nodejs_version: [20, 22]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.nodejs_version }}
cache: 'yarn'
- name: Initialize
shell: bash
# export DISPLAY=':99.0'
# usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
run: yarn install
- name: Test for Linux
if: runner.os == 'Linux'
shell: bash
run: xvfb-run -a yarn run test
- name: Test for else
if: runner.os != 'Linux'
shell: bash
run: yarn run test