-
Notifications
You must be signed in to change notification settings - Fork 73
59 lines (58 loc) · 1.57 KB
/
node-gyp.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
name: node-gyp integration
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
integration:
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
python: ["3.8", "3.x", "3.12-dev"]
runs-on: ${{ matrix.os }}
steps:
- name: Clone gyp-next
uses: actions/checkout@v3
with:
path: gyp-next
- name: Clone nodejs/node-gyp
uses: actions/checkout@v3
with:
repository: nodejs/node-gyp
path: node-gyp
- uses: actions/setup-node@v3
with:
node-version: 18.x
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install Python dependencies
run: |
cd gyp-next
python -m pip install --upgrade pip setuptools
pip install --editable .
pip uninstall -y gyp-next
- name: Install Node.js dependencies
run: |
cd node-gyp
npm install --no-progress
- name: Replace gyp in node-gyp
shell: bash
run: |
rm -rf node-gyp/gyp
cp -r gyp-next node-gyp/gyp
- name: Run tests (macOS or Linux)
if: runner.os != 'Windows'
shell: bash
run: |
cd node-gyp
npm test --python="${pythonLocation}/python"
- name: Run tests (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
cd node-gyp
npm run test --python="${env:pythonLocation}\\python.exe"