forked from COVAIL/electron-quick-start
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (61 loc) · 1.86 KB
/
buildTest.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
58
59
60
61
62
63
64
65
66
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
#
# See https://github.com/r-lib/actions/tree/master/examples#readme for
# additional example workflows available for the R community.
name: Test Build and Run
on:
push:
branches: [ "master" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
jobs:
test:
name: Node ${{ matrix.node_version }}, R ${{ matrix.R }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node_version: ['18.x', '20.x']
os: [ubuntu-latest, macos-latest, windows-latest]
R: ['4.1.3', '4.2.3', '4.3.3']
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
- name: Use R ${{ matrix.R }}
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.R }}
- name: Setup R dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: shiny
- name: Setup wine Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt install wine
- name: Setup wine macOS
if: matrix.os =='macos-latest'
run: |
brew install wine-stable --cask
- name: Npm install
run: |
npm install -g --save-dev @electron/packager
npm install
- name: Package
run: |
npm run package-win --if-present
npm run package-linux --if-present
npm run package-mac --if-present
- name: Test with xvfb
uses: coactions/setup-xvfb@v1
with:
run: |
npm i -g electron
npm i -g electron-mocha
electron-mocha test