-
Notifications
You must be signed in to change notification settings - Fork 26
fix: use setTimeout Promise #58
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,24 @@ | ||||||||||||||||||
| name: Node.js 14 CI | ||||||||||||||||||
|
|
||||||||||||||||||
| on: | ||||||||||||||||||
| push: | ||||||||||||||||||
| branches: [ master ] | ||||||||||||||||||
| pull_request: | ||||||||||||||||||
| branches: [ master ] | ||||||||||||||||||
|
|
||||||||||||||||||
| jobs: | ||||||||||||||||||
| build: | ||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||
|
|
||||||||||||||||||
| steps: | ||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||
| - name: Use Node.js | ||||||||||||||||||
| uses: irby/setup-node-nvm@master | ||||||||||||||||||
| with: | ||||||||||||||||||
| node-version: '16.x' | ||||||||||||||||||
| - run: npm install | ||||||||||||||||||
| - run: npm run prepublishOnly | ||||||||||||||||||
| - run: node -v | ||||||||||||||||||
| - run: nvm install 14 && nvm use 14 | ||||||||||||||||||
| - run: node -v | ||||||||||||||||||
| - run: node dist/commonjs/bin/detect-port.js | ||||||||||||||||||
|
||||||||||||||||||
| - run: node dist/commonjs/bin/detect-port.js | |
| - name: Test detect-port binary | |
| run: | | |
| set -e | |
| if ! output=$(node dist/commonjs/bin/detect-port.js 2>&1); then | |
| echo "Error running detect-port: $output" | |
| exit 1 | |
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Consider using the official Node.js setup action
The workflow uses
irby/setup-node-nvm@masterwhich is a third-party action. For better security and reliability, consider using the officialactions/setup-nodeaction which also supports multiple Node.js versions.