ruff rule PLC0206 and RUF021 (#270) #530
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: node-gyp integration | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
node-gyp-integration: | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: ["22"] | |
os: [macos-13, macos-14, ubuntu-latest, windows-latest] | |
python-version: ["3.8", "3.10", "3.12", "3.13"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Clone gyp-next | |
uses: actions/checkout@v4 | |
with: | |
path: gyp-next | |
- name: Clone nodejs/node-gyp | |
uses: actions/checkout@v4 | |
with: | |
repository: nodejs/node-gyp | |
path: node-gyp | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
allow-prereleases: true | |
- 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" |