31
31
python-version : ["3.7", "3.8", "3.9", "3.10", "3.11"]
32
32
33
33
steps :
34
- - name : Update network connectivity
35
- run : |
36
- sudo ethtool -K eth0 tx off rx off
37
- sudo apt install bubblewrap
38
-
39
34
- name : Checkout code
40
35
uses : actions/checkout@v3
41
36
@@ -44,27 +39,26 @@ jobs:
44
39
with :
45
40
python-version : " ${{ matrix.python-version }}"
46
41
47
- - name : Install dependencies and create virtual environment
42
+ - name : Install dependencies
48
43
run : |
49
- python3 -m pip install --user --upgrade pip
50
- python3 -m pip install --user virtualenv
51
- python3 -m venv env
52
- ls -lha
44
+ sudo ethtool -K eth0 tx off rx off
45
+ sudo apt install bubblewrap
46
+ pip install --user --upgrade pip
47
+ pip install --user pipenv
48
+ cd env && ls -lha
53
49
54
- - name : Run tests in isolated virtual environment
50
+ - name : Run tests
55
51
run : |
56
- source env/bin/activate
57
- if [ -f requirements.txt ]; then python3 -m pip install -r requirements.txt; fi
58
- if [ -f requirements-dev.txt ]; then python3 -m pip install -r requirements.txt-dev; fi
59
- python3 -m pip install--upgrade pip
52
+ if [ -f requirements.txt ]; then pipenv install -r requirements.txt; fi
53
+ if [ -f requirements-dev.txt ]; then pipenv install -r requirements.txt-dev; fi
60
54
which python3
61
55
bwrap \
62
56
--ro-bind / / \
63
57
--bind $PWD $PWD \
64
58
--unshare-all \
65
59
--clearenv \
66
60
--setenv EXAMPLE VALUE \
67
- python3 -m coverage run -m unittest
61
+ pipenv run coverage run -m unittest
68
62
deactivate
69
63
70
64
- name : Run linting
73
67
- if : ${{ matrix.python-version == '3.10' }}
74
68
name : Upload coverage
75
69
uses :
codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # [email protected]
76
- with :
77
- directory : ./coverage/reports/
78
- env_vars : OS,PYTHON
79
- fail_ci_if_error : true
80
- files : ./coverage.xml
81
- flags : unittests
82
- name : codecov-umbrella
83
- verbose : true
84
70
85
71
- if : ${{ matrix.python-version == '3.10' }}
86
72
name : Build documentation
0 commit comments