-
Notifications
You must be signed in to change notification settings - Fork 0
181 lines (171 loc) · 7.93 KB
/
unittest_pytest_coverage_doc.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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# https://docs.github.com/en/actions/learn-github-actions/introduction-to-github-actions
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
# todo:
# https://docs.github.com/en/actions/guides/building-and-testing-python
# https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows
name: unittest_pytest_coverage_doc
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
pep8_check:
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: apt-get update
run: sudo apt-get update
- name: install dependencies for PEP 8 code style check (ubuntu packages)
run: sudo apt-get install pep8 pylint python3-recommonmark python3-pytest python3-dulwich
- name: pep8 version
run: pep8 --version
- name: pylint version
run: pylint --version
- name: check PEP 8 code style
run: pep8 --show-source --show-pep8 --statistics $(find -name "*.py")
- name: run pylint with finding similarities (may fail)
run: pylint -j 3 --include-naming-hint=y --good-names=i,j,k,fd $(find -name "*.py")
continue-on-error: true
- name: run pylint
run: pylint -j 3 --include-naming-hint=y --good-names=i,j,k,fd --disable=similarities $(find -name "*.py")
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# https://github.com/marketplace/actions/checkout
- uses: actions/setup-python@v2
# https://github.com/marketplace/actions/setup-python
- uses: pre-commit/[email protected]
# https://github.com/pre-commit/action
#continue-on-error: true
ubuntu-2004_test_doc:
needs: [pep8_check, pre-commit]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: apt-get update
run: sudo apt-get update
- name: install dependencies (ubuntu packages)
run: sudo apt-get install python3-fusepy python3-pytest python3-pytest-cov python3-pytest-xdist python3-setuptools python3-dulwich git-annex python3-sphinx python3-sphinx-argparse python3-recommonmark latexmk texlive-latex-recommended texlive-fonts-recommended texlive-latex-extra
- name: setup author identity for git commits
run: |
test -n "$(git config user.name)" || git config --global user.name $USER
hostname=$HOSTNAME
test -n "$hostname" || hostname="runner"
test -n "$(git config user.email)" || git config --global user.email $(git config user.name)@$hostname
- name: local unittest
run: env python3 setup.py run_unittest --src local
- name: local pytest
run: env python3 setup.py run_pytest --src local
- name: check_modules
run: env python3 setup.py check_modules
- name: check_modules_modulefinder
run: env python3 setup.py check_modules_modulefinder
- name: install fuse_git_bare_fs
run: pip3 install .
- name: unittest
run: env python3 setup.py run_unittest
- name: pytest
run: env python3 setup.py run_pytest --parallel --coverage
- name: build doc
run: ./create_doc
- name: uninstall dulwich (ubuntu packages)
run: sudo apt-get remove python3-dulwich
- name: local unittest (using git instead of dulwich)
run: env python3 setup.py run_unittest --src local
- name: local pytest (using git instead of dulwich)
run: env python3 setup.py run_pytest --src local
- name: unittest (using git instead of dulwich)
run: env python3 setup.py run_unittest
- name: pytest (using git instead of dulwich)
run: env python3 setup.py run_pytest --parallel --coverage
ubuntu-2204_test_doc:
needs: [pep8_check, pre-commit]
# runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: apt-get update
run: sudo apt-get update
- name: install dependencies (ubuntu packages)
run: sudo apt-get install python3-fusepy python3-pytest python3-pytest-cov python3-pytest-xdist python3-setuptools python3-dulwich git-annex python3-sphinx python3-sphinx-argparse python3-recommonmark latexmk texlive-latex-recommended texlive-fonts-recommended texlive-latex-extra fuse
- name: setup author identity for git commits
run: |
test -n "$(git config user.name)" || git config --global user.name $USER
hostname=$HOSTNAME
test -n "$hostname" || hostname="runner"
test -n "$(git config user.email)" || git config --global user.email $(git config user.name)@$hostname
- name: local unittest
run: env python3 setup.py run_unittest --src local
- name: local pytest
run: env python3 setup.py run_pytest --src local
- name: check_modules
run: env python3 setup.py check_modules
- name: check_modules_modulefinder
run: env python3 setup.py check_modules_modulefinder
- name: install fuse_git_bare_fs
run: pip3 install .
- name: unittest
run: env python3 setup.py run_unittest
- name: pytest
run: env python3 setup.py run_pytest --parallel --coverage
- name: build doc
run: ./create_doc
- name: uninstall dulwich (ubuntu packages)
run: sudo apt-get remove python3-dulwich
- name: local unittest (using git instead of dulwich)
run: env python3 setup.py run_unittest --src local
- name: local pytest (using git instead of dulwich)
run: env python3 setup.py run_pytest --src local
- name: unittest (using git instead of dulwich)
run: env python3 setup.py run_unittest
- name: pytest (using git instead of dulwich)
run: env python3 setup.py run_pytest --parallel --coverage
opensuse_leap_154_test:
runs-on: ubuntu-latest
needs: [pep8_check, pre-commit]
name: opensuse leap 15.4
steps:
- name: Checkout
uses: actions/checkout@v3
- name: run test_suite in opensuse/leap:15.4
run: sudo docker run --mount type=bind,source=$(pwd),destination=/app --rm --device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined opensuse/leap:15.4 app/.github/workflows/do_test_opensuse_leap:15.4
opensuse_leap_155_test:
runs-on: ubuntu-latest
needs: [pep8_check, pre-commit]
name: opensuse leap 15.5
steps:
- name: Checkout
uses: actions/checkout@v3
- name: run test_suite in opensuse/leap:15.5
run: sudo docker run --mount type=bind,source=$(pwd),destination=/app --rm --device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined opensuse/leap:15.4 app/.github/workflows/do_test_opensuse_leap:15.5
deploy_pages:
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md
runs-on: ubuntu-latest
needs: [ubuntu-2004_test_doc, ubuntu-2204_test_doc, opensuse_leap_154_test, opensuse_leap_155_test]
steps:
- uses: actions/checkout@v3
- name: apt-get update
run: sudo apt-get update
- name: install dependencies (ubuntu packages)
run: sudo apt-get install python3-fusepy python3-pytest python3-pytest-cov python3-pytest-xdist python3-setuptools python3-dulwich git-annex python3-sphinx python3-sphinx-argparse python3-recommonmark latexmk texlive-latex-recommended texlive-fonts-recommended texlive-latex-extra fuse
- name: setup author identity for git commits
run: |
test -n "$(git config user.name)" || git config --global user.name $USER
hostname=$HOSTNAME
test -n "$hostname" || hostname="runner"
test -n "$(git config user.email)" || git config --global user.email $(git config user.name)@$hostname
- name: install fuse_git_bare_fs
run: pip3 install .
- name: create coverage report
run: env python3 setup.py run_pytest --parallel --coverage
- name: build doc
run: ./create_doc
- name: deploy pages
if: ${{ github.event_name == 'push' }}
uses: JamesIves/[email protected]
with:
branch: documentation
folder: manual_fuse_git_bare_fs_html