-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
100 changed files
with
5,302 additions
and
3,157 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
*.swp | ||
gyp/test | ||
node_modules | ||
test/.node-gyp | ||
|
Oops, something went wrong.