Skip to content

Commit 763ef92

Browse files
authored
Merge pull request #577 from maximegris/github-actions
Set GitHub actions
2 parents e6d0aa6 + 831ea51 commit 763ef92

File tree

7 files changed

+20398
-21
lines changed

7 files changed

+20398
-21
lines changed

.github/workflows/macos.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# This is a basic workflow to help you get started with Actions
2+
name: 'MacOS Build'
3+
4+
# Controls when the action will run.
5+
on:
6+
# Triggers the workflow on push or pull request events but only for the master branch
7+
push:
8+
branches:
9+
- master
10+
pull_request:
11+
branches:
12+
- master
13+
14+
# Allows you to run this workflow manually from the Actions tab
15+
workflow_dispatch:
16+
17+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
18+
jobs:
19+
build:
20+
strategy:
21+
matrix:
22+
node-version: [10.13.0, 12.x, 14.x, 15.x]
23+
24+
# The type of runner that the job will run on
25+
runs-on: macos-latest
26+
27+
steps:
28+
- uses: actions/checkout@v2
29+
30+
- name: Cache node modules
31+
uses: actions/cache@v2
32+
env:
33+
cache-name: cache-node-modules
34+
with:
35+
# npm cache files are stored in `~/.npm` on Linux/macOS
36+
path: ~/.npm
37+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
38+
restore-keys: |
39+
${{ runner.os }}-build-${{ env.cache-name }}-
40+
${{ runner.os }}-build-
41+
${{ runner.os }}-
42+
43+
- name: Use Node.js ${{ matrix.node-version }}
44+
uses: actions/setup-node@v1
45+
with:
46+
node-version: ${{ matrix.node-version }}
47+
- name: Install Dependencies
48+
run: npm i
49+
- name: Check lint
50+
run: npm run lint
51+
- name: Build the app
52+
run: npm run electron:build

.github/workflows/ubuntu.yml

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# This is a basic workflow to help you get started with Actions
2+
name: 'Linux Build'
3+
4+
# Controls when the action will run.
5+
on:
6+
# Triggers the workflow on push or pull request events but only for the master branch
7+
push:
8+
branches:
9+
- master
10+
pull_request:
11+
branches:
12+
- master
13+
14+
# Allows you to run this workflow manually from the Actions tab
15+
workflow_dispatch:
16+
17+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
18+
jobs:
19+
build:
20+
strategy:
21+
matrix:
22+
node-version: [10.13.0, 12.x, 14.x, 15.x]
23+
24+
# The type of runner that the job will run on
25+
runs-on: ubuntu-latest
26+
27+
steps:
28+
- uses: actions/checkout@v2
29+
30+
- name: Cache node modules
31+
uses: actions/cache@v2
32+
env:
33+
cache-name: cache-node-modules
34+
with:
35+
# npm cache files are stored in `~/.npm` on Linux/macOS
36+
path: ~/.npm
37+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
38+
restore-keys: |
39+
${{ runner.os }}-build-${{ env.cache-name }}-
40+
${{ runner.os }}-build-
41+
${{ runner.os }}-
42+
43+
- name: Use Node.js ${{ matrix.node-version }}
44+
uses: actions/setup-node@v1
45+
with:
46+
node-version: ${{ matrix.node-version }}
47+
48+
- name: Install Dependencies
49+
run: npm i
50+
51+
- name: Check lint
52+
run: npm run lint
53+
54+
- name: Build the app
55+
run: npm run electron:build
56+
57+
- name: Run headless unit test
58+
uses: GabrielBB/xvfb-action@v1
59+
with:
60+
run: npm test
61+
62+
- name: Run headless unit test
63+
uses: GabrielBB/xvfb-action@v1
64+
with:
65+
run: npm run e2e

.github/workflows/windows.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# This is a basic workflow to help you get started with Actions
2+
name: 'Windows Build'
3+
4+
# Controls when the action will run.
5+
on:
6+
# Triggers the workflow on push or pull request events but only for the master branch
7+
push:
8+
branches:
9+
- master
10+
pull_request:
11+
branches:
12+
- master
13+
14+
# Allows you to run this workflow manually from the Actions tab
15+
workflow_dispatch:
16+
17+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
18+
jobs:
19+
build:
20+
strategy:
21+
matrix:
22+
node-version: [10.13.0, 12.x, 14.x, 15.x]
23+
24+
# The type of runner that the job will run on
25+
runs-on: windows-latest
26+
27+
steps:
28+
- uses: actions/checkout@v2
29+
30+
- name: Cache node modules
31+
uses: actions/cache@v2
32+
env:
33+
cache-name: cache-node-modules
34+
with:
35+
# npm cache files are stored in `~/.npm`
36+
path: ~/.npm
37+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
38+
restore-keys: |
39+
${{ runner.os }}-build-${{ env.cache-name }}-
40+
${{ runner.os }}-build-
41+
${{ runner.os }}-
42+
43+
- name: Use Node.js ${{ matrix.node-version }}
44+
uses: actions/setup-node@v1
45+
with:
46+
node-version: ${{ matrix.node-version }}
47+
- name: Install Dependencies
48+
run: npm i
49+
- name: Check lint
50+
run: npm run lint
51+
- name: Build the app
52+
run: npm run electron:build

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ src/**/*.js
3838
npm-debug.log
3939
testem.log
4040
/typings
41-
package-lock.json
4241

4342
# e2e
4443
/e2e/*.js

.travis.yml

-19
This file was deleted.

0 commit comments

Comments
 (0)