-
Notifications
You must be signed in to change notification settings - Fork 1.3k
67 lines (57 loc) · 1.67 KB
/
jest-coverage.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# name: Jest Coverage Check
# on:
# pull_request:
# branches:
# - develop
# - main
# - release/v*
# jobs:
# jest_coverage:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# - name: Install dependencies
# run: cd frontend && yarn install
# - name: npm test-run-changed
# run: cd frontend && npm run test-changedsince
# - name: Upload Coverage Results
# uses: actions/upload-artifact@v2
# with:
# name: coverage
# path: ./frontend/coverage
# - name: Display Coverage Summary
# run: |
# echo "Coverage Summary:"
# cat coverage/lcov-report/index.html | grep -oP '(?<=<span class="strong">).*(?=%</span>)' | tail -n 1
name: tests(push) - install, lint, test:changedsince
on: [push]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
node-version: [10.x, 12.x]
steps:
- uses: actions/checkout@v2
- run: |
git fetch --no-tags --depth=1 origin develop
git checkout -b develop
git checkout ${{ github.event.pull_request.head.sha }}
- name: Use Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: npm install
env:
CI: true
- name: npm run lint
run: npm run lint
env:
CI: true
- name: npm run test:changedsince
run: npm run test:changedsince
env:
CI: true