Rewrite in N-API for Electron 30+ compatibility #109
Workflow file for this run
This file contains hidden or 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: | |
| - pull_request | |
| - push | |
| jobs: | |
| Test: | |
| if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - macos-latest | |
| - windows-latest | |
| node_version: | |
| - 16 | |
| - 18 | |
| - 20 | |
| include: | |
| - os: windows-2019 | |
| node_version: 14 | |
| - os: macos-13 | |
| node_version: 14 | |
| name: Node ${{ matrix.node_version }} on ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| node_modules | |
| key: ${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('package.json') }} | |
| - name: Setup node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node_version }} | |
| - name: Setup python | |
| if: matrix.node_version == 14 | |
| # Old versions of Node bundle old versions of npm. | |
| # Old versions of npm bundle old versions of node-gyp. | |
| # Old versions of node-gyp are incompatible with Python 3.11+. | |
| # Install older Python (Python 3.10) as a workaround. | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| - name: Install Python setuptools (Unix-likes) | |
| # This is needed for Python 3.12+, since many versions of node-gyp | |
| # are incompatible with Python 3.12+, which no-longer ships 'distutils' | |
| # out of the box. 'setuptools' package provides 'distutils'. | |
| if: ${{ runner.os != 'Windows' }} | |
| run: python3 -m pip install --break-system-packages setuptools | |
| - name: Install Python setuptools (Windows) | |
| # This is needed for Python 3.12+, since many versions of node-gyp | |
| # are incompatible with Python 3.12+, which no-longer ships 'distutils' | |
| # out of the box. 'setuptools' package provides 'distutils'. | |
| if: ${{ runner.os == 'Windows' }} | |
| run: | | |
| python3 -m venv CI_venv | |
| CI_venv\Scripts\activate.bat | |
| python3 -m pip install setuptools | |
| - name: Install dependencies (Unix-likes) | |
| if: ${{ runner.os != 'Windows' }} | |
| run: | | |
| npm install | |
| - name: Install dependencies (Windows) | |
| if: ${{ runner.os == 'Windows' }} | |
| run: | | |
| CI_venv\Scripts\activate.bat | |
| npm install | |
| - name: Lint | |
| run: npm run standard | |
| - name: Run tests | |
| run: | | |
| npm run test:node | |
| npm run test:native | |
| Skip: | |
| if: contains(github.event.head_commit.message, '[skip ci]') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Skip CI 🚫 | |
| run: echo skip ci |