Skip to content

Commit a62c5c2

Browse files
New GitHub workflow
1 parent b099dc0 commit a62c5c2

File tree

3 files changed

+36
-48
lines changed

3 files changed

+36
-48
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Test
2+
3+
permissions:
4+
contents: read
5+
6+
on: [push, pull_request]
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
test:
14+
name: 'Test'
15+
runs-on: ${{ matrix.os }}
16+
timeout-minutes: 10
17+
18+
strategy:
19+
matrix:
20+
node-version: [20.x, 22.x, 24.x]
21+
os: [ubuntu-latest, windows-latest, macOS-latest]
22+
23+
steps:
24+
- uses: actions/checkout@v5
25+
26+
- name: Use Node.js ${{ matrix.node-version }}
27+
uses: actions/setup-node@v5
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
31+
- run: npm ci
32+
33+
- run: npm test

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# nice-try
22

3-
![Build](https://github.com/electerious/nice-try/workflows/Build/badge.svg)
3+
[![Test](https://github.com/electerious/nice-try/actions/workflows/test.yml/badge.svg)](https://github.com/electerious/nice-try/actions/workflows/test.yml)
44

55
A function that tries to execute a function and discards any error that occurs.
66

@@ -38,7 +38,7 @@ await niceTry(async () => JSON.parse('error')) // undefined
3838

3939
#### Returns
4040

41-
- `{*}` The return value of the function, or `undefined` if an error occurred.
41+
- `{any}` The return value of the function, or `undefined` if an error occurred.
4242

4343
### `nice-try/promises`
4444

@@ -48,7 +48,7 @@ await niceTry(async () => JSON.parse('error')) // undefined
4848

4949
#### Returns
5050

51-
- `{Promise<*>}` The result of the function if it resolves successfully, otherwise undefined if an error is thrown.
51+
- `{Promise<any>}` The result of the function if it resolves successfully, otherwise undefined if an error is thrown.
5252

5353
## What others say
5454

0 commit comments

Comments
 (0)