Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: use .npmignore file to limit which files are published #2921

Merged
merged 8 commits into from
Oct 28, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,36 @@ jobs:
# TODO: move this to its own action
npm install @npmcli/arborist@7 semver@7 --no-save
node .github/scripts/check-engines.js
Pack_Test:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
lukekarrys marked this conversation as resolved.
Show resolved Hide resolved
- name: Use Node.js 20.x
uses: actions/setup-node@v3
lukekarrys marked this conversation as resolved.
Show resolved Hide resolved
with:
node-version: 20.x
- name: Update npm
run: npm install npm@latest -g
- name: Install Dependencies
run: npm install --no-progress
- name: Pack
id: pack
env:
NODE_GYP_TEMP_DIR: '${{ runner.temp }}/node-gyp'
run: |
mkdir -p $NODE_GYP_TEMP_DIR
npm pack
tar xzf *.tgz -C $NODE_GYP_TEMP_DIR --strip-components=1
cp -r test/ $NODE_GYP_TEMP_DIR/test/
echo "dir=$NODE_GYP_TEMP_DIR" >> "$GITHUB_OUTPUT"
- name: Test
working-directory: ${{ steps.pack.outputs.dir }}
env:
FULL_TEST: '1'
run: |
npm install --no-progress
npm test
Tests:
needs: Lint_Python # Lint_Python takes ~5 seconds, so wait for it to pass before running the full matrix of tests.
strategy:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ test/.node-gyp
.ncu
.nyc_output
package-lock.json
node-gyp-*.tgz
15 changes: 15 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
*.swp
.ncu
.nyc_output
node-gyp-*.tgz
/.github/
/docs/
/gyp/.github/
/gyp/*.md
/gyp/AUTHORS
/gyp/tools/
/node-gyp-*.tgz
/test/
/update-gyp.py
/gyp/test
/test/.node-gyp
lukekarrys marked this conversation as resolved.
Show resolved Hide resolved