forked from yocontra/node-gdal-next
-
-
Notifications
You must be signed in to change notification settings - Fork 29
84 lines (74 loc) · 2.7 KB
/
test-npm.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
name: Test npm package
on:
workflow_dispatch:
inputs:
version:
description: 'Package version to test'
required: true
jobs:
test_npm_binaries:
runs-on: ${{ matrix.platforms }}
strategy:
fail-fast: false
matrix:
platforms: [ ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, windows-2019, macos-13, macos-15 ]
node-version: [ 18.x, 20.x, 22.x, 23.x ]
exclude:
- platforms: ubuntu-20.04
node-version: 23.x
steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Set up the unit tests
run: |
curl https://codeload.github.com/mmomtchev/node-gdal-async/zip/refs/tags/v${{ github.event.inputs.version }} --output repo.zip
unzip repo.zip
mv node-gdal-async-${{ github.event.inputs.version }}/package.json .
mv node-gdal-async-${{ github.event.inputs.version }}/test .
npm install
- name: Install from npm
run: npm install --force gdal-async@${{ github.event.inputs.version }}
- name: Run the unit tests
run: |
cd test
npx mocha --reporter=tap -r ts-node/register -r _common.ts -r _hooks.ts --timeout 20000 --v8-expose-gc *.test.ts
env:
TS_NODE_PROJECT: tsconfig.test.json
test_npm_rebuild:
runs-on: ${{ matrix.platforms }}
strategy:
fail-fast: false
matrix:
platforms: [ ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, windows-2019, macos-13, macos-15 ]
node-version: [ 18.x, 20.x, 22.x, 23.x ]
exclude:
- platforms: ubuntu-20.04
node-version: 23.x
steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Set up the unit tests
run: |
curl https://codeload.github.com/mmomtchev/node-gdal-async/zip/refs/tags/v${{ github.event.inputs.version }} --output repo.zip
unzip repo.zip
mv node-gdal-async-${{ github.event.inputs.version }}/package.json .
mv node-gdal-async-${{ github.event.inputs.version }}/test .
npm install
- name: Rebuild with npm
run: npm install --verbose --force gdal-async@${{ github.event.inputs.version }} --build-from-source
- name: Run the unit tests
run: |
cd test
npx mocha --reporter=tap -r ts-node/register -r _common.ts -r _hooks.ts --timeout 20000 --v8-expose-gc *.test.ts
env:
TS_NODE_PROJECT: tsconfig.test.json