Skip to content

Commit c8e7fd8

Browse files
committed
Create a GitHub Actions workflow to run tests on push and pull request events
* Use `actions/checkout@v2` to check out the repository * Use `actions/setup-node@v2` to set up Node.js * Run `npm install` to install dependencies * Run `npm test` to execute tests
1 parent 30fa982 commit c8e7fd8

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/test.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Node.js CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v2
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v2
20+
with:
21+
node-version: '14'
22+
23+
- name: Install dependencies
24+
run: npm install
25+
26+
- name: Run tests
27+
run: npm test

0 commit comments

Comments
 (0)