-
Notifications
You must be signed in to change notification settings - Fork 708
79 lines (76 loc) · 2.5 KB
/
validate-pr.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
name: Validate pull request
on:
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
check:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Disable git core.autocrlf
run: git config --global core.autocrlf false
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node 20.14.0
uses: actions/setup-node@v4
with:
node-version: '20.14.0'
- name: Setup node_modules cache
uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install package dependencies
run: yarn install
- name: Lint
run: yarn lint
- name: Test
run: yarn test
- name: Build app/
run: yarn build
env:
NODE_ENV: production
- name: Build uncompressed on dist/
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }}
run: yarn electron-builder --dir
- name: Build uncompressed on dist/
if: ${{ matrix.os == 'windows-latest' }}
run: yarn electron-builder --x64 --ia32 --dir
- name: Running executable on ${{ runner.os }}
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
xvfb-run timeout 30 ./dist/linux-unpacked/rocketchat-desktop || code=$?
if [[ $code -ne 124 && $code -ne 0 ]]; then
exit $code;
fi
- name: Running executable on ${{ runner.os }}
if: ${{ matrix.os == 'macos-latest' }}
run: |
brew install coreutils
gtimeout 30 ./dist/mac-arm64/Rocket.Chat.app/Contents/MacOS/Rocket.Chat || code=$?
if [[ $code -ne 124 && $code -ne 0 ]]; then
exit $code;
fi
- name: Running executable on ${{ runner.os }}
if: ${{ matrix.os == 'windows-latest' }}
run: |
$job = Start-Job -ScriptBlock { .\dist\win-unpacked\Rocket.Chat.exe }
if (Wait-Job $job -Timeout 30) {
Write-Host $(Receive-Job -Job $job)
}
Remove-Job -force $job
$job = Start-Job -ScriptBlock { .\dist\win-ia32-unpacked\Rocket.Chat.exe }
if (Wait-Job $job -Timeout 30) {
Write-Host $(Receive-Job -Job $job)
}
Remove-Job -force $job