-
Notifications
You must be signed in to change notification settings - Fork 61
/
action.yml
53 lines (48 loc) 路 1.3 KB
/
action.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
---
name: Test Unit
description: Check unit tests
inputs:
python-version:
description: "Python version"
required: true
os:
description: "Operating system"
required: true
report_job:
description: "Job name to update by JUnit report"
required: true
runs:
using: "composite"
steps:
- name: Install package
uses: ./.github/actions/install-package
with:
python-version: ${{ inputs.python-version }}
os: ${{ inputs.os }}
- name: Test
run: |
coverage run -p -m pytest -v ./tests/unit/ \
--timeout=120 --timeout_method=thread \
--junitxml="./test-results/test-unit-new-${{ inputs.os }}-${{ inputs.python-version }}.xml"
shell: bash
- name: Upload test coverage
uses: actions/upload-artifact@v2
if: always()
with:
name: unit-coverage
path: ./.coverage*
- name: Upload test reports
uses: actions/upload-artifact@v2
if: always()
with:
name: test-artifacts
path: ./test-results
- name: Report
uses: mikepenz/action-junit-report@v3.6.2
if: always()
with:
report_paths: './test-results/test-unit-*.xml'
update_check: true
include_passed: true
annotate_notice: true
job_name: ${{ inputs.report_job }}