-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (43 loc) · 1.13 KB
/
pr-testing.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Node Test for PRs
on:
pull_request:
branches:
- development
- staging
- "release/*"
- main
jobs:
test:
name: Install dependencies and test
runs-on: ubuntu-latest
strategy:
matrix:
node: ["14"]
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: |
~/.npm
**/node_modules
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- run: npm ci
- run: npm run test
- name: Build
run: npm run build
- uses: romeovs/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
lcov-file: ./build/reports/jest/lcov.info