Skip to content

Commit 0cf2672

Browse files
add pull requests tests
1 parent 0ff5257 commit 0cf2672

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/run-tests.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Run tests
2+
on:
3+
push:
4+
pull_request:
5+
workflow_dispatch:
6+
jobs:
7+
checkout:
8+
runs-on: ubuntu-latest
9+
environment: dev
10+
steps:
11+
- name: Get code
12+
uses: actions/checkout@v4
13+
- name: Cache dependencies
14+
id: cache
15+
uses: actions/cache@v4
16+
with:
17+
path: node_modules
18+
key: deps-node-modules-${{ hashFiles('**/package-lock.json') }}
19+
- name: Install dependencies
20+
if: steps.cache.outputs.cache-hit != 'true'
21+
run: npm ci
22+
test:
23+
runs-on: ubuntu-latest
24+
needs: checkout
25+
steps:
26+
- name: Run tests
27+
run: npm run test

0 commit comments

Comments
 (0)