-
Notifications
You must be signed in to change notification settings - Fork 8
executable file
·157 lines (130 loc) · 3.85 KB
/
unit_win.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
############################################################
# -*- coding: utf-8 -*-
#
# # # # # # #
# ## ## # ## # #
# # # # # # # # # # #
# # ## # ## ## ######
# # # # # # #
#
# Python-based Tool for interaction with the 10micron mounts
# GUI with PyQT5 for python3
#
# written in python3, (c) 2019-2024 by mworion
# Licence APL2.0
#
###########################################################
name: unit_win
concurrency:
group: "${{ github.ref }}-${{ github.workflow }}"
cancel-in-progress: true
env:
cov: '--cov=mw4/ --cov-append'
on:
push:
# Run this action on the trigger event when specific files are touched
paths:
- 'mw4/**'
- 'tests/unit_tests/**'
- 'setup.py'
- 'tox.ini'
- '.github/workflows/unit_win.yml'
- '.github/actions/build_package/action.yml'
- '.github/actions/setup_test/action.yml'
jobs:
build_package:
#
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v4
- name: build package
uses: ./.github/actions/build_package
run_tests_windows_1:
#
needs: build_package
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: install package
uses: ./.github/actions/setup_test_cov
- name: running_unit_tests
run: |
pytest tests/unit_tests/loader ${{env.cov}}
pytest tests/unit_tests/update ${{env.cov}}
pytest tests/unit_tests/mainApp ${{env.cov}}
pytest tests/unit_tests/gui/mainWindow ${{env.cov}}
- name: rename_coveragefile
run: mv .coverage c1.dat
- uses: actions/upload-artifact@v4
with:
name: c1
path: c1.dat
run_tests_windows_2:
#
needs: build_package
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: install package
uses: ./.github/actions/setup_test_cov
- name: running_unit_tests
run: |
pytest tests/unit_tests/base ${{env.cov}}
pytest tests/unit_tests/logic ${{env.cov}}
pytest tests/unit_tests/mountcontrol ${{env.cov}}
pytest tests/unit_tests/indibase ${{env.cov}}
- name: rename_coveragefile
run: mv .coverage c2.dat
- uses: actions/upload-artifact@v4
with:
name: c2
path: c2.dat
run_tests_windows_3:
#
needs: build_package
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: install package
uses: ./.github/actions/setup_test_cov
- name: running_unit_tests
run: |
pytest tests/unit_tests/gui/extWindows ${{env.cov}}
pytest tests/unit_tests/gui/utilities ${{env.cov}}
pytest tests/unit_tests/gui/mainWaddon ${{env.cov}}
- name: rename_coveragefile
run: mv .coverage c3.dat
- uses: actions/upload-artifact@v4
with:
name: c3
path: c3.dat
coverage:
#
needs: [ run_tests_windows_1, run_tests_windows_2,
run_tests_windows_3]
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: c1
- uses: actions/download-artifact@v4
with:
name: c2
- uses: actions/download-artifact@v4
with:
name: c3
- name: combining_data
run: |
dir
python -m pip install coverage
python -m coverage combine c1.dat c2.dat c3.dat
python -m coverage xml
- name: upload
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml
flags: unittests
name: codecov-umbrella
env_vars: OS,PYTHON