-
Notifications
You must be signed in to change notification settings - Fork 7
60 lines (58 loc) · 1.8 KB
/
incremental-cover-check.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
name: Coverage check
on: [push, pull_request]
jobs:
lint:
name: Code coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.13.0'
- name: Install Dependencies
run: npm ci
- name: Test build
run: npm run build-no-tsc --if-present
- name: Run tests
run: npm test
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: PIP install
run: |
pip3 install -r requirements.txt
pip3 install coverage django_coverage_plugin
- name: Python unittest
continue-on-error: true
run: |
coverage run -m unittest discover tests/
- name: Generate coverage report
continue-on-error: true
run: |
coverage report -m
coverage json
- name: Coverage check on pull_request
uses: velis74/incremental-coverage-check@main
with:
clover_coverage_json: vue/dynamicforms/coverage/coverage-final.json
py_coverage_json: coverage.json
logging_level: INFO
base_ref: ${{ github.base_ref }}
head_ref: HEAD
rep_ref: main
gh_token: ${{ secrets.GITHUB_TOKEN }}
if: github.event_name == 'pull_request'
- name: Coverage check on push
uses: velis74/incremental-coverage-check@main
with:
clover_coverage_json: vue/dynamicforms/coverage/coverage-final.json
py_coverage_json: coverage.json
logging_level: INFO
base_ref: ${{ github.event.before }}
head_ref: HEAD
rep_ref: main
if: github.event_name == 'push'