Experimental support for new tdjson interface #384
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
jobs: | |
build-and-test: | |
name: 'Test (Node v${{ matrix.node }} on ${{ matrix.os }})' | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
- windows-2019 | |
node: | |
- 18 | |
include: | |
# tdl should still work with node v12, however many of the dev deps in | |
# this repository don't support v12 | |
- node: 14 | |
os: ubuntu-latest | |
- node: 16 | |
os: ubuntu-latest | |
- node: 20 | |
os: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: npm | |
- name: Update npm | |
run: npm install -g npm@8 | |
- 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.19", | |
"td-1.8.14", | |
"td-1.8.0", | |
"td-1.7.0", | |
"td-1.5.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:USE_PREBUILT="$td/package/index.js" | |
npm run integration-tests | |
if ($LastExitCode -ne 0) { | |
exit $LastExitCode | |
} | |
} |