5959 chmod -R 700 /home/pyrunner/.cache/pip
6060
6161 sudo -u pyrunner bash -c "
62- python -m venv /home/pyrunner /venv &&
63- source /home/pyrunner /venv/bin/activate &&
62+ python -m venv ~ /venv &&
63+ source ~ /venv/bin/activate &&
6464 pip install --upgrade pip &&
6565 pip install -r requirements.txt
6666 "
8686 - name : Save Python Environment Cache
8787 uses : actions/cache@v3
8888 with :
89- path : /home/pyrunner /venv
89+ path : ~ /venv
9090 key : ${{ runner.os }}-python-venv-${{ hashFiles('requirements.txt') }}
9191
9292 lint :
@@ -100,12 +100,12 @@ jobs:
100100 - name : Restore Python Environment Cache
101101 uses : actions/cache@v3
102102 with :
103- path : /home/pyrunner /venv
103+ path : ~ /venv
104104 key : ${{ runner.os }}-python-venv-${{ hashFiles('requirements.txt') }}
105105
106106 - name : Run Flake8
107107 run : |
108- source /home/pyrunner /venv/bin/activate
108+ source ~ /venv/bin/activate
109109 flake8 .
110110
111111 security :
@@ -119,12 +119,12 @@ jobs:
119119 - name : Restore Python Environment Cache
120120 uses : actions/cache@v3
121121 with :
122- path : /home/pyrunner /venv
122+ path : ~ /venv
123123 key : ${{ runner.os }}-python-venv-${{ hashFiles('requirements.txt') }}
124124
125125 - name : Run Bandit Security Check
126126 run : |
127- source /home/pyrunner /venv/bin/activate
127+ source ~ /venv/bin/activate
128128 bandit -r .
129129
130130 quality :
@@ -138,21 +138,21 @@ jobs:
138138 - name : Restore Python Environment Cache
139139 uses : actions/cache@v3
140140 with :
141- path : /home/pyrunner /venv
141+ path : ~ /venv
142142 key : ${{ runner.os }}-python-venv-${{ hashFiles('requirements.txt') }}
143143
144144 - name : Run Pylint
145145 run : |
146- source /home/pyrunner /venv/bin/activate
146+ source ~ /venv/bin/activate
147147 pylint .
148148
149149 - name : Check Black Formatting
150150 run : |
151- source /home/pyrunner /venv/bin/activate
151+ source ~ /venv/bin/activate
152152 black --check .
153153
154154 - name : Check Pydocstyle
155155 run : |
156- source /home/pyrunner /venv/bin/activate
156+ source ~ /venv/bin/activate
157157 pydocstyle .
158158 continue-on-error : true # Non-blocking
0 commit comments