-
Notifications
You must be signed in to change notification settings - Fork 52
58 lines (58 loc) · 1.69 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
name: CI
on: [push, pull_request]
jobs:
build-and-test:
name: 'Test / Node v${{ matrix.node }} / ${{ matrix.os }}'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
# Weirdly arm64 macos-14 doesn't really work because typescript fails with
# RangeError: Maximum call stack size exceeded at getOuterTypeParameters
- macos-13
- windows-latest
node:
- 20
include:
- node: 16
os: ubuntu-latest
- node: 18
os: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: npm
- name: Update npm
run: npm install -g npm@9
- run: npm install # also runs the `prepare` npm script, which runs `build`
- run: npm test
- name: Run integration tests
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
$tds = @(
"td-1.8.30",
"td-1.8.27",
"td-1.8.26",
"td-1.8.25",
"td-1.8.19",
"td-1.8.14",
"td-1.8.0"
)
foreach ($td in $tds) {
mkdir $td
npm pack prebuilt-tdlib@$td --pack-destination=$td
Get-ChildItem -Path $td -Filter *.tgz | ForEach-Object {
tar xzvf $_.FullName --directory=$td
}
rm $td/package/package.json
$env:PREBUILT_PATH="$td/package/index.js"
npm run test:integration
if ($LastExitCode -ne 0) {
exit $LastExitCode
}
}