Move to GitHub Actions

This commit is contained in:
Sindre Sorhus 2020-12-01 14:57:27 +07:00
parent dececa8aa3
commit 5e4f43cf37
5 changed files with 27 additions and 12 deletions

23
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,23 @@
name: CI
on:
- push
- pull_request
jobs:
test:
name: Node.js ${{ matrix.node-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version:
- 14
- 12
- 10
- 8
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test

View File

@ -1,4 +0,0 @@
language: node_js
node_js:
- '10'
- '8'

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

View File

@ -7,7 +7,7 @@
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
"url": "https://sindresorhus.com"
},
"engines": {
"node": ">=8"

View File

@ -1,15 +1,13 @@
# p-timeout [![Build Status](https://travis-ci.org/sindresorhus/p-timeout.svg?branch=master)](https://travis-ci.org/sindresorhus/p-timeout)
# p-timeout
> Timeout a promise after a specified amount of time
## Install
```
$ npm install p-timeout
```
## Usage
```js
@ -22,7 +20,6 @@ pTimeout(delayedPromise, 50).then(() => 'foo');
//=> [TimeoutError: Promise timed out after 50 milliseconds]
```
## API
### pTimeout(input, milliseconds, message?)
@ -48,7 +45,7 @@ Passing `Infinity` will cause it to never time out.
#### message
Type: `string` `Error`<br>
Type: `string | Error`\
Default: `'Promise timed out after 50 milliseconds'`
Specify a custom error message or error.
@ -78,7 +75,6 @@ pTimeout(delayedPromise(), 50, () => {
Exposed for instance checking and sub-classing.
## Related
- [delay](https://github.com/sindresorhus/delay) - Delay a promise a specified amount of time