Skip to content

ci: add GH workflow for CI #67

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

Merged
merged 5 commits into from
May 10, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
28 changes: 28 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Node.js CI

on:
push:
branches:
- main
pull_request:

jobs:

test:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [ 16, 14, 12, 10 ]

steps:
- uses: actions/checkout@v2
- run: |
git config --global user.name github-actions
git config --global user.email github-actions@github.com
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run test
4 changes: 2 additions & 2 deletions lib/deps.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ internals.resolve = async ({ packageJson, lockfile }, options) => {

for (const dep of arborist.idealTree.inventory.values()) {

if (dep.root === dep) {
if (dep.isProjectRoot) {
// root node is not a dep, really
continue;
}
Expand All @@ -41,7 +41,7 @@ internals.resolve = async ({ packageJson, lockfile }, options) => {
continue;
}

if (!options.deep && ![...dep.edgesIn].some(({ from }) => from === arborist.idealTree)) {
if (!options.deep && ![...dep.edgesIn].some(({ from }) => from.isProjectRoot)) {
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"sinon": "^10.0.0"
},
"dependencies": {
"@npmcli/arborist": "^2.0.0",
"@npmcli/arborist": "^2.1.0",
"@octokit/plugin-throttling": "^3.2.2",
"@octokit/rest": "^18.0.0",
"@pkgjs/nv": "0.1.0",
Expand Down