@@ -48,22 +48,19 @@ jobs:
4848 id : setup-pypy
4949 with :
5050 python-version : " pypy3.9"
51+ cache : ' pip'
5152 - run : ln -s '${{ steps.setup-pypy.outputs.python-path }}' /usr/local/bin/pypy3.9
5253 - env :
5354 LD_LIBRARY_PATH : ${{ steps.setup-pypy.outputs.pythonLocation }}/bin
5455 run : echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV
56+ - run : pip install -r scripts/requirements.txt
5557
5658 # Install rust components.
5759 - uses : ./.github/actions/bootstrap
5860 with :
5961 extra_rust_toolchains : ${{ env.EXTRA_RUST_TOOLCHAINS }}
6062 github_token : ${{ secrets.GITHUB_TOKEN }}
6163
62- - name : Setup Python venv
63- run : |
64- python3 -m venv ci
65- ci/bin/pip install -r scripts/requirements.txt
66-
6764 # Check Cargo.lock is up to date.
6865 - name : " Check Cargo.lock"
6966 run : |
@@ -77,13 +74,13 @@ jobs:
7774 # Run code style on PR.
7875 - name : " Run TODO style pull request"
7976 if : github.event_name == 'pull_request'
80- run : ci/bin/python scripts/named_todos.py --commit_id ${{ github.event.pull_request.base.sha }}
77+ run : scripts/named_todos.py --commit_id ${{ github.event.pull_request.base.sha }}
8178 - name : " Run clippy pull request"
8279 if : github.event_name == 'pull_request'
83- run : ci/bin/python scripts/run_tests.py --command clippy --changes_only --commit_id ${{ github.event.pull_request.base.sha }}
80+ run : scripts/run_tests.py --command clippy --changes_only --commit_id ${{ github.event.pull_request.base.sha }}
8481 - name : " Run cargo doc pull request"
8582 if : github.event_name == 'pull_request'
86- run : ci/bin/python scripts/run_tests.py --command doc --changes_only --commit_id ${{ github.event.pull_request.base.sha }}
83+ run : scripts/run_tests.py --command doc --changes_only --commit_id ${{ github.event.pull_request.base.sha }}
8784
8885 # Run code style on push.
8986 - name : " Run rustfmt"
@@ -93,10 +90,10 @@ jobs:
9390
9491 - name : " Run clippy on push"
9592 if : github.event_name == 'push'
96- run : ci/bin/python scripts/run_tests.py --command clippy
93+ run : scripts/run_tests.py --command clippy
9794 - name : " Run cargo doc on push"
9895 if : github.event_name == 'push'
99- run : ci/bin/python scripts/run_tests.py --command doc
96+ run : scripts/run_tests.py --command doc
10097
10198 - name : " Run taplo"
10299 run : scripts/taplo.sh
@@ -128,30 +125,29 @@ jobs:
128125 id : setup-pypy
129126 with :
130127 python-version : " pypy3.9"
128+ cache : ' pip'
131129 - run : ln -s '${{ steps.setup-pypy.outputs.python-path }}' /usr/local/bin/pypy3.9
132130 - env :
133131 LD_LIBRARY_PATH : ${{ env.Python3_ROOT_DIR }}/bin
134132 run : echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV
133+ - run : pip install -r scripts/requirements.txt
134+
135135 # TODO(Gilad): only one test needs this (base_layer_test.rs), once it migrates to
136136 # anvil, remove.
137137 -
run :
npm install -g [email protected] 138138
139139 - name : " Run tests pull request"
140140 if : github.event_name == 'pull_request'
141141 run : |
142- python3 -m venv ci
143- ci/bin/pip install -r scripts/requirements.txt
144- ci/bin/python scripts/run_tests.py --command test --changes_only --include_dependencies --commit_id ${{ github.event.pull_request.base.sha }}
142+ scripts/run_tests.py --command test --changes_only --include_dependencies --commit_id ${{ github.event.pull_request.base.sha }}
145143 env :
146144 SEED : 0
147145
148146 - name : " Run tests on push"
149147 if : github.event_name == 'push'
150148 # TODO(AdiY/Dori): Better support for running tests on push.
151149 run : |
152- python3 -m venv ci
153- ci/bin/pip install -r scripts/requirements.txt
154- ci/bin/python scripts/run_tests.py --command test
150+ scripts/run_tests.py --command test
155151 env :
156152 SEED : 0
157153
@@ -171,19 +167,20 @@ jobs:
171167 id : setup-pypy
172168 with :
173169 python-version : " pypy3.9"
170+ cache : ' pip'
174171 - run : ln -s '${{ steps.setup-pypy.outputs.python-path }}' /usr/local/bin/pypy3.9
175172 - env :
176173 LD_LIBRARY_PATH : ${{ env.Python3_ROOT_DIR }}/bin
177174 run : echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV
175+ - run : pip install -r scripts/requirements.txt
176+
178177 # TODO(Gilad): only one test needs this (base_layer_test.rs), once it migrates to
179178 # anvil, remove.
180179 -
run :
npm install -g [email protected] 181180
182181 - name : " Run integration tests pull request"
183182 if : github.event_name == 'pull_request'
184183 run : |
185- python3 -m venv ci
186- ci/bin/pip install -r scripts/requirements.txt
187- ci/bin/python scripts/run_tests.py --command integration --changes_only --include_dependencies --commit_id ${{ github.event.pull_request.base.sha }}
184+ scripts/run_tests.py --command integration --changes_only --include_dependencies --commit_id ${{ github.event.pull_request.base.sha }}
188185 env :
189186 SEED : 0
0 commit comments