Skip to content

Commit 3ad03be

Browse files
Merge pull request #33 from oslabs-beta/github-actions
GitHub actions
2 parents a110ee8 + 0bbac7c commit 3ad03be

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: Jest
2+
on:
3+
pull_request:
4+
types: [opened, edited, reopened, synchronize]
5+
branches:
6+
- dev
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: Setup Node.js
13+
uses: actions/setup-node@v3
14+
with:
15+
node-version: "18.13.0"
16+
17+
- name: Cache node modules
18+
uses: actions/cache@v3
19+
env:
20+
cache-name: cache-node-modules
21+
with:
22+
path: ~/.npm
23+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
24+
restore-keys: |
25+
${{ runner.os }}-build-${{ env.cache-name }}-
26+
${{ runner.os }}-build-
27+
${{ runner.os }}-
28+
29+
- name: Install Dependencies
30+
run: npm install
31+
32+
- name: Run the tests
33+
run: npm test

0 commit comments

Comments
 (0)