This repository has been archived by the owner on Jun 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 120
119 lines (101 loc) · 4.17 KB
/
test_desktop.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
name: Trinity Desktop Tests
on:
pull_request:
paths:
- '*'
- 'src/shared/**'
- 'src/desktop/**'
- '.github/workflows/test_desktop.yml'
branches-ignore:
- 'l10n_develop'
jobs:
test-desktop:
runs-on: ${{ matrix.os }}
strategy:
matrix:
#os: [ubuntu-18.04, macos-10.15, windows-2019]
os: [macos-10.15]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Debug
run: echo ${{ github.ref }} ${{ github.head_ref }} ${{ github.base_ref }}
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Set up Python 2.x
uses: actions/setup-python@v2
with:
python-version: '2.x'
- name: Install required packages - Linux
run: |
sudo apt update
sudo apt install -yq gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \
libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \
libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 \
libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \
ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget \
xvfb x11vnc x11-xkb-utils xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic x11-apps
if: matrix.os == 'ubuntu-18.04'
- name: Cache root node_modules
uses: actions/cache@v2
id: cache-root-node_modules
with:
path: ${{ github.workspace }}/node_modules
key: trinity-root-node_modules-${{ matrix.os }}-${{ hashFiles('yarn.lock') }}
- name: Install root dependencies
run: yarn
if: steps.cache-root-node_modules.outputs.cache-hit != 'true'
- name: Cache shared node_modules
uses: actions/cache@v2
id: cache-shared-node_modules
with:
path: ${{ github.workspace }}/src/shared/node_modules
key: trinity-shared-node_modules-${{ matrix.os }}-${{ hashFiles('src/shared/yarn.lock') }}
- name: Install shared dependencies
run: yarn deps:shared
if: steps.cache-shared-node_modules.outputs.cache-hit != 'true'
- name: Install OpenSSL 1.0.2s - Windows
# For Realm on Windows
# Prebuilt openssl:x64-windows-static from https://github.com/microsoft/vcpkg/releases/tag/2019.12
run: |
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest https://iotaledger-files.s3.eu-central-1.amazonaws.com/trinity/desktop/prebuild/windows/vcpkg-export-openssl-1.0.2s.zip -OutFile openssl.zip
Expand-Archive openssl.zip -DestinationPath C:\src\vcpkg
Remove-Item openssl.zip
if: matrix.os == 'windows-2019'
- name: Install OpenSSL 1.0.2k - Linux
# For Realm on Linux
# Use this version of OpenSSL instead of the one provided by Ubuntu
run: |
curl -SL https://www.openssl.org/source/old/1.0.2/openssl-1.0.2k.tar.gz | tar -zx
cd openssl-1.0.2k
./Configure -DPIC -fPIC -fvisibility=hidden -fvisibility-inlines-hidden \
no-zlib-dynamic no-dso linux-x86_64 --prefix=/usr
make
sudo make install_sw
cd ..
rm -rf openssl-1.0.2k
echo "::add-path::/usr/local/ssl"
if: matrix.os == 'ubuntu-18.04'
- name: Cache desktop node_modules
id: cache-desktop-node_modules
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/src/desktop/node_modules
key: trinity-desktop-node_modules-${{ matrix.os }}-${{ hashFiles('src/desktop/npm-shrinkwrap.json') }}
- name: Install desktop dependencies
run: yarn deps:desktop
if: steps.cache-desktop-node_modules.outputs.cache-hit != 'true'
- name: Run ESLint
run: yarn lint:desktop
- name: Run desktop tests - Linux
run: xvfb-run --server-args="-screen 0 1024x768x24" yarn test:desktop
if: matrix.os == 'ubuntu-18.04'
- name: Run desktop tests - macOS/Windows
run: |
cd src/desktop
npm test -- --runInBand
timeout-minutes: 20
if: matrix.os == 'macos-10.15' || matrix.os == 'windows-2019'