Skip to content

ci: install python dependencies #24

ci: install python dependencies

ci: install python dependencies #24

Workflow file for this run

name: Build & Test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 20
- name: Setup Python and Install distutils (if needed)
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }}
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install Python dependencies for node-gyp on Ubuntu/MacOS
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-get update
sudo apt-get install -y python3-distutils python3-setuptools
- name: Install Python dependencies for node-gyp on macOS
if: ${{ matrix.os == 'macos-latest' }}
run: |
brew install [email protected]
echo "Setting Python version for node-gyp"
npm config set python $(which python3)
- name: Install Python dependencies for node-gyp on Windows
if: ${{ matrix.os == 'windows-latest' }}
run: |
npm config set python $(where python)
- run: npm install
- run: npm test