-
Notifications
You must be signed in to change notification settings - Fork 85
86 lines (78 loc) · 2.16 KB
/
electorrent-workflow.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Electorrent Release
on:
push:
branches:
- master
pull_request:
env:
NODE_VERSION: 14.x
ELECTRON_IS_DEV: 0
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
testspec: [qbittorrent, rtorrent, transmission, deluge, utorrent]
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt-get install xvfb
- name: Install nodejs
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Cache npm modules
uses: actions/cache@v4
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- name: Cache bower modules
uses: actions/cache@v4
with:
path: bower.json
key: ${{ runner.os }}-${{ hashFiles('bower.json') }}
- name: Install npm dependencies
run: npm install
- name: Build web application
run: npm run build
- name: Run e2e tests
timeout-minutes: 10
run: xvfb-run -a -- npm test -- -g ${{ matrix.testspec }}
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install apt packages
run: sudo apt-get update && sudo apt-get install -y graphicsmagick icnsutils
if: runner.os == 'Linux'
- name: Checkout source code
uses: actions/checkout@v2
- name: Install nodejs
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Cache npm modules
uses: actions/cache@v4
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- name: Install npm dependencies
run: npm install
- name: Build distribution
run: npm run dist
if: github.ref != 'refs/heads/master'
- name: Release artifacts
if: github.ref == 'refs/heads/master'
run: npm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}