-
Notifications
You must be signed in to change notification settings - Fork 21
38 lines (38 loc) · 1.33 KB
/
pytest.yaml
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
name: Pytest
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: checkout repo content
uses: actions/checkout@v3 # checkout the repository content to github runner.
- name: setup python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install graphviz
run: sudo apt install graphviz
shell: bash
- name: Install dependencies
run: |
sudo pip3 install --upgrade pip
sudo pip3 install sphinx_rtd_theme
sudo pip3 install sphinx
sudo pip3 install pytest
sudo pip3 install pytest-check
- name: Execute py script
env:
working-directory: ${{runner.workspace}}/cimpy
run: |
sudo python3 setup.py install
- name: Pytest
env:
working-directory: ${{runner.workspace}}/cimpy
run: |
sudo pytest -v -cov --junitxml=report.xml
- name: Upload pytest test results
uses: actions/upload-artifact@v3
with:
name: pytest-results
path: ${{runner.workspace}}/cimpy/report.xml
if: ${{ always() }}