forked from signalapp/Signal-Desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
142 lines (124 loc) · 3.68 KB
/
ci.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# Copyright 2020 Signal Messenger, LLC
# SPDX-License-Identifier: AGPL-3.0-only
name: CI
on: [push]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- run: lsb_release -a
- run: uname -a
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '12.13.0'
- run: npm install -g [email protected]
- name: Cache node modules
uses: actions/cache@v1
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }}-${{ hashFiles('patches/*') }}
- run: yarn install --frozen-lockfile
- run: yarn generate
- run: yarn lint
- run: yarn lint-deps
- run: yarn lint-license-comments
- run: git diff --exit-code
macos:
needs: lint
runs-on: macos-latest
if: github.ref == 'refs/heads/development' || github.ref == 'refs/heads/master'
steps:
- run: uname -a
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '12.13.0'
- run: npm install -g [email protected]
- name: Cache node modules
uses: actions/cache@v1
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }}-${{ hashFiles('patches/*') }}
- run: yarn install --frozen-lockfile
- run: yarn generate
- run: yarn lint
- run: yarn lint-deps
- run: yarn prepare-beta-build
- run: yarn build
- run: yarn test-node
- run: yarn test-electron
- run: yarn grunt test-release:osx
env:
NODE_ENV: production
linux:
needs: lint
runs-on: ubuntu-latest
steps:
- run: lsb_release -a
- run: uname -a
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '12.13.0'
- run: sudo apt-get install xvfb
- run: npm install -g [email protected]
- name: Cache node modules
uses: actions/cache@v1
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }}-${{ hashFiles('patches/*') }}
- run: yarn install --frozen-lockfile
- run: yarn generate
- run: yarn lint
- run: yarn lint-deps
- run: yarn prepare-beta-build
- run: yarn build
- run: xvfb-run --auto-servernum yarn test-node
- run: xvfb-run --auto-servernum yarn test-electron
env:
LANG: en_US
LANGUAGE: en_US
- run: xvfb-run --auto-servernum yarn grunt test-release:linux
env:
NODE_ENV: production
windows:
needs: lint
runs-on: windows-latest
steps:
- run: systeminfo
- run: git config --global core.autocrlf false
- run: git config --global core.eol lf
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '12.13.0'
- run: npm install -g [email protected]
- name: Cache node modules
uses: actions/cache@v1
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }}-${{ hashFiles('patches/*') }}
- run: yarn install --frozen-lockfile
- run: yarn generate
- run: yarn lint
- run: yarn lint-deps
- run: node build\grunt.js
- run: yarn test-node
- run: copy package.json temp.json
- run: del package.json
- run: type temp.json | findstr /v certificateSubjectName | findstr /v certificateSha1 > package.json
- run: yarn prepare-beta-build
- run: yarn build
- run: node build\grunt.js test
- run: node build\grunt.js test-release:win
env:
SIGNAL_ENV: production