Skip to content

Commit 76e3a1e

Browse files
committed
Add jest to CI actions
1 parent 0c64585 commit 76e3a1e

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/jest.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Run Jest Tests
2+
on: push
3+
jobs:
4+
test:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v2
8+
- name: Setup Node.js
9+
uses: actions/setup-node@v1
10+
with:
11+
node-version: "14"
12+
13+
# Speed up subsequent runs with caching
14+
- name: Cache node modules
15+
uses: actions/cache@v2
16+
env:
17+
cache-name: cache-node-modules
18+
with:
19+
# npm cache files are stored in `~/.npm` on Linux/macOS
20+
path: ~/.npm
21+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
22+
restore-keys: |
23+
${{ runner.os }}-build-${{ env.cache-name }}-
24+
${{ runner.os }}-build-
25+
${{ runner.os }}-
26+
27+
# Install required deps for action
28+
- name: Install Dependencies
29+
run: npm install
30+
31+
# Finally, run our tests
32+
- name: Run the tests
33+
run: npm test

0 commit comments

Comments
 (0)