-
Notifications
You must be signed in to change notification settings - Fork 542
134 lines (125 loc) · 4.07 KB
/
test.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
name: Node CI
on:
pull_request:
types: [ opened, synchronize, edited ]
push:
branches:
- dev-*
- '*/dev'
env:
emscripten_version: 3.1.59
RUSTFLAGS: "--cfg ci" # turns off some integration tests that need a server to pass
permissions:
actions: none
checks: none
contents: read
deployments: none
id-token: none
issues: none
discussions: none
packages: none
pages: none
pull-requests: none
repository-projects: none
security-events: none
statuses: none
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- uses: "./.github/shared/setup"
- name: lint, formatting
run: |
npm run check
- name: check for FIXMEs
run: |
if grep "FIXME\|[fF]ixme" -r src buildSrc test/tests packages/*/lib app-android/app/src app-ios/tutanota/Sources; then
echo 'FIXMEs in src';
exit 1;
else
echo 'No FIXMEs in src';
fi
test-node:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
with:
submodules: 'true'
- uses: "./.github/shared/setup"
- uses: "./.github/shared/setup-rust"
- uses: "./.github/shared/setup-emscripten"
with:
emscripten-version: ${{ env.emscripten_version }}
- name: run tests
run: |
npm run build-packages
npm run test-ci
test-browser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
with:
submodules: 'true'
- uses: "./.github/shared/setup"
- uses: "./.github/shared/setup-rust"
- uses: "./.github/shared/setup-emscripten"
with:
emscripten-version: ${{ env.emscripten_version }}
- name: install chrome
id: setup-chrome
uses: browser-actions/setup-chrome@facf10a55b9caf92e0cc749b4f82bf8220989148 #v1.7.2
with:
chrome-version: stable
- name: run test in browser
timeout-minutes: 10
# --no-sandbox is needed because it fails to create sandbox in container otherwise.
# It is fine as we run our own tests in a throwaway container anyway
run: |
echo Chrome version: ${{ steps.setup-chrome.outputs.chrome-version }}
npm run test:app -- --no-run --browser --browser-cmd '${{ steps.setup-chrome.outputs.chrome-path }} --no-sandbox --enable-logging=stderr --headless=new --disable-gpu'
build-webapp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
with:
submodules: 'true'
- uses: "./.github/shared/setup"
- uses: "./.github/shared/setup-rust"
- uses: "./.github/shared/setup-emscripten"
with:
emscripten-version: ${{ env.emscripten_version }}
- name: build webapp
run: |
npm run build-packages
node webapp --disable-minify
build-calendar:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
with:
submodules: 'true'
- uses: "./.github/shared/setup"
- uses: "./.github/shared/setup-rust"
- uses: "./.github/shared/setup-emscripten"
with:
emscripten-version: ${{ env.emscripten_version }}
- name: build webapp
run: |
npm run build-packages
node webapp --disable-minify --app calendar
build-desktop: # will check that offline migrations are there
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
with:
submodules: 'true'
- uses: "./.github/shared/setup"
- uses: "./.github/shared/setup-rust"
- uses: "./.github/shared/setup-emscripten"
with:
emscripten-version: ${{ env.emscripten_version }}
- name: build desktop
run: |
npm run build-packages
node desktop --disable-minify