forked from oxen-io/session-desktop
-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (57 loc) · 2.01 KB
/
pull-request.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
# This script will run tests anytime a pull request is added
name: Session Test
on:
pull_request:
branches:
- clearnet
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-2019, macos-latest, ubuntu-20.04]
env:
SIGNAL_ENV: production
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- run: git config --global core.autocrlf false
- name: Checkout git repo
uses: actions/checkout@v3
# we stay on v2 even if there is a v3 because the v3 logic is less flexible for our usecase
- name: Install node
uses: actions/setup-node@v2
with:
node-version: '18.16.1'
- name: Cache Desktop node_modules
id: cache-desktop-modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-${{ hashFiles('package.json', 'yarn.lock', 'patches/**') }}
- name: Chocolatey Install Action
if: runner.os == 'Windows'
uses: crazy-max/[email protected]
with:
args: install python2 visualcpp-build-tools -y
#Not having this will break the windows build because the PATH won't be set by msbuild.
- name: Add msbuild to PATH
uses: microsoft/[email protected]
if: runner.os == 'Windows'
- name: Setup node for windows
if: runner.os == 'Windows'
run: |
npm install --global node-gyp@latest
npm config set python python2.7
npm config set msvs_version 2017
- name: Install Desktop node_modules
if: steps.cache-desktop-modules.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --network-timeout 600000 --force
- name: Generate and concat files
run: yarn build-everything
- name: Lint Files
# no need to lint files on all platforms. Just do it once on the quicker one
if: runner.os == 'Linux'
run: yarn lint-full
- name: Unit Test
run: yarn test