Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed Oct 28, 2023
2 parents 36ebfdc + d644ce4 commit 9e7d486
Show file tree
Hide file tree
Showing 100 changed files with 5,302 additions and 3,157 deletions.
5 changes: 4 additions & 1 deletion .github/ISSUE_TEMPLATE.md
Expand Up @@ -13,6 +13,10 @@ provide the basic information we require.
-->

Please look thru your error log for the string `gyp info using node-gyp@` and if the version number is less than the [current release of node-gyp](https://github.com/nodejs/node-gyp/releases) then __please upgrade__ using the instructions at https://github.com/nodejs/node-gyp/blob/main/docs/Updating-npm-bundled-node-gyp.md and try your command again.

Requests for help with [`node-sass` are very common](https://github.com/nodejs/node-gyp/issues?q=label%3A%22Node+Sass+--%3E+Dart+Sass%22). Please be aware that this package is deprecated, you should seek alternatives and avoid opening new issues about it here.

* **Node Version**: <!-- `node -v` and `npm -v` -->
* **Platform**: <!-- `uname -a` (UNIX), or `systeminfo | findstr /B /C:"OS Name" /C:"OS Version" /C:"System Type"` (Windows) -->
* **Compiler**: <!-- `cc -v` (UNIX) or `msbuild /version & cl` (Windows) -->
Expand Down Expand Up @@ -46,4 +50,3 @@ Usage: npm <command>
</details>

<!-- Any further details -->

4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
@@ -1,7 +1,7 @@
<!--
Thank you for your pull request. Please review the below requirements.
Contributor guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md
Contributor guide: https://github.com/nodejs/node/blob/main/CONTRIBUTING.md
-->

##### Checklist
Expand All @@ -10,7 +10,7 @@ Contributor guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md
- [ ] `npm install && npm test` passes
- [ ] tests are included <!-- Bug fixes and new features should include tests -->
- [ ] documentation is changed or added
- [ ] commit message follows [commit guidelines](https://github.com/nodejs/node/blob/master/doc/guides/contributing/pull-requests.md#commit-message-guidelines)
- [ ] commit message follows [commit guidelines](https://github.com/googleapis/release-please#how-should-i-write-my-commits)

##### Description of change
<!-- Provide a description of the change -->
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/release-please.yml
@@ -0,0 +1,60 @@
name: release-please

on:
push:
branches:
- main

jobs:
release-please:
permissions:
contents: write # to create release commit (google-github-actions/release-please-action)
pull-requests: write # to create release PR (google-github-actions/release-please-action)

runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v2
id: release
with:
package-name: node-gyp
release-type: node
changelog-types: >
[{"type":"feat","section":"Features","hidden":false},
{"type":"fix","section":"Bug Fixes","hidden":false},
{"type":"bin","section":"Core","hidden":false},
{"type":"gyp","section":"Core","hidden":false},
{"type":"lib","section":"Core","hidden":false},
{"type":"src","section":"Core","hidden":false},
{"type":"test","section":"Tests","hidden":false},
{"type":"build","section":"Core","hidden":false},
{"type":"clean","section":"Core","hidden":false},
{"type":"configure","section":"Core","hidden":false},
{"type":"install","section":"Core","hidden":false},
{"type":"list","section":"Core","hidden":false},
{"type":"rebuild","section":"Core","hidden":false},
{"type":"remove","section":"Core","hidden":false},
{"type":"deps","section":"Core","hidden":false},
{"type":"python","section":"Core","hidden":false},
{"type":"lin","section":"Core","hidden":false},
{"type":"linux","section":"Core","hidden":false},
{"type":"mac","section":"Core","hidden":false},
{"type":"macos","section":"Core","hidden":false},
{"type":"win","section":"Core","hidden":false},
{"type":"windows","section":"Core","hidden":false},
{"type":"zos","section":"Core","hidden":false},
{"type":"doc","section":"Doc","hidden":false},
{"type":"docs","section":"Doc","hidden":false},
{"type":"readme","section":"Doc","hidden":false},
{"type":"chore","section":"Miscellaneous","hidden":false},
{"type":"refactor","section":"Miscellaneous","hidden":false},
{"type":"ci","section":"Miscellaneous","hidden":false},
{"type":"meta","section":"Miscellaneous","hidden":false}]
# Standard Conventional Commits: `feat` and `fix`
# node-gyp subdirectories: `bin`, `gyp`, `lib`, `src`, `test`
# node-gyp subcommands: `build`, `clean`, `configure`, `install`, `list`, `rebuild`, `remove`
# Core abstract category: `deps`
# Languages/platforms: `python`, `lin`, `linux`, `mac`, `macos`, `win`, `window`, `zos`
# Documentation: `doc`, `docs`, `readme`
# Standard Conventional Commits: `chore` (under "Miscellaneous")
# Miscellaneous abstract categories: `refactor`, `ci`, `meta`
53 changes: 31 additions & 22 deletions .github/workflows/tests.yml
@@ -1,51 +1,60 @@
# TODO: Line 47, enable pytest --doctest-modules
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
# TODO: Line 48, enable pytest --doctest-modules

name: Tests
on: [push, pull_request]
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
Lint_Python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pip install --user ruff
- run: ruff --output-format=github --select="E,F,PLC,PLE,UP,W,YTT" --ignore="E721,PLC1901,S101,UP031" --target-version=py38 .
Tests:
needs: Lint_Python # Lint_Python takes ~5 seconds, so wait for it to pass before running the full matrix of tests.
strategy:
fail-fast: false
fail-fast: false
max-parallel: 15
matrix:
node: [10.x, 12.x, 14.x]
python: [3.6, 3.8, 3.9]
node: [16.x, 18.x, 20.x]
python: ["3.8", "3.11"]
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Use Python ${{ matrix.python }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
env:
PYTHON_VERSION: ${{ matrix.python }}
PYTHON_VERSION: ${{ matrix.python }} # Why do this?
- name: Install Dependencies
run: |
npm install --no-progress
pip install flake8 pytest
pip install pytest
- name: Set Windows environment
if: matrix.os == 'windows-latest'
if: startsWith(matrix.os, 'windows')
run: |
echo 'GYP_MSVS_VERSION=2015' >> $Env:GITHUB_ENV
echo 'GYP_MSVS_OVERRIDE_PATH=C:\\Dummy' >> $Env:GITHUB_ENV
- name: Lint Python
if: matrix.os == 'ubuntu-latest'
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run Python tests
run: |
python -m pytest
run: python -m pytest
# - name: Run doctests with pytest
# run: python -m pytest --doctest-modules
- name: Environment Information
run: npx envinfo
- name: Run Node tests
run: |
npm test
run: npm test
37 changes: 37 additions & 0 deletions .github/workflows/visual-studio.yml
@@ -0,0 +1,37 @@
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources

name: visual-studio
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
visual-studio:
strategy:
fail-fast: false
max-parallel: 8
matrix:
os: [windows-latest]
msvs-version: [2016, 2019, 2022] # https://github.com/actions/virtual-environments/tree/main/images/win
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Install Dependencies
run: |
npm install --no-progress
# npm audit fix --force
- name: Set Windows environment
if: startsWith(matrix.os, 'windows')
run: |
echo 'GYP_MSVS_VERSION=${{ matrix.msvs-version }}' >> $Env:GITHUB_ENV
echo 'GYP_MSVS_OVERRIDE_PATH=C:\\Dummy' >> $Env:GITHUB_ENV
- name: Environment Information
run: npx envinfo
- name: Run Node tests
run: npm test
1 change: 1 addition & 0 deletions .gitignore
@@ -1,3 +1,4 @@
*.swp
gyp/test
node_modules
test/.node-gyp
Expand Down

0 comments on commit 9e7d486

Please sign in to comment.