@@ -43,13 +43,17 @@ jobs:
4343 with :
4444 python-version : ${{ matrix.python-version }}
4545 cache : ' pip'
46- - name : Restore venv
47- uses : actions/download-artifact@v4
46+ - name : Cache pip packages
47+ uses : actions/cache@v3
4848 with :
49- name : ${{ runner.os }}-python-${{ matrix.python-version }}-venv-${{github.run_id}}
50- - name : Untar venv
51- run : tar -xvf venv.tar
52- - name : run unit tests
49+ path : ~/.cache/pip
50+ key : pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements.txt') }}
51+ restore-keys : |
52+ pip-${{ matrix.python-version }}-
53+ - run : |
54+ ./ci/linux/create_venv.sh
55+ ./ci/linux/install_dependencies.sh
56+ - name : lint
5357 run : |
5458 ./ci/linux/lint.sh
5559
@@ -68,12 +72,16 @@ jobs:
6872 with :
6973 python-version : ${{ matrix.python-version }}
7074 cache : ' pip'
71- - name : Restore venv
72- uses : actions/download-artifact@v4
75+ - name : Cache pip packages
76+ uses : actions/cache@v3
7377 with :
74- name : ${{ runner.os }}-python-${{ matrix.python-version }}-venv-${{github.run_id}}
75- - name : Untar venv
76- run : tar -xvf venv.tar
78+ path : ~/.cache/pip
79+ key : pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements.txt') }}
80+ restore-keys : |
81+ pip-${{ matrix.python-version }}-
82+ - run : |
83+ ./ci/linux/create_venv.sh
84+ ./ci/linux/install_dependencies.sh
7785 - name : run unit tests
7886 run : |
7987 ./ci/linux/test_unit.sh
@@ -116,15 +124,16 @@ jobs:
116124 with :
117125 python-version : ${{ matrix.python-version }}
118126 cache : ' pip'
119- - name : Restore venv
120- uses : actions/download-artifact@v4
127+ - name : Cache pip packages
128+ uses : actions/cache@v3
121129 with :
122- name : ${{ runner.os }}-python-${{ matrix.python-version }}-venv-${{github.run_id}}
123- - name : Untar venv
124- run : tar -xvf venv.tar
125- - name : Add mypy annotator
126- uses : pr-annotators/mypy-pr-annotator@v1.0.0
127-
130+ path : ~/.cache/pip
131+ key : pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements.txt') }}
132+ restore-keys : |
133+ pip-${{ matrix.python-version }}-
134+ - run : |
135+ ./ci/linux/create_venv.sh
136+ ./ci/linux/install_dependencies.sh
128137 - name : run typechecker
129138 run : |
130139 ./ci/linux/typecheck.sh
@@ -144,12 +153,16 @@ jobs:
144153 with :
145154 python-version : ${{ matrix.python-version }}
146155 cache : ' pip'
147- - name : Restore venv
148- uses : actions/download-artifact@v4
156+ - name : Cache pip packages
157+ uses : actions/cache@v3
149158 with :
150- name : ${{ runner.os }}-python-${{ matrix.python-version }}-venv-${{github.run_id}}
151- - name : Untar venv
152- run : tar -xvf venv.tar
159+ path : ~/.cache/pip
160+ key : pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements.txt') }}
161+ restore-keys : |
162+ pip-${{ matrix.python-version }}-
163+ - run : |
164+ ./ci/linux/create_venv.sh
165+ ./ci/linux/install_dependencies.sh
153166 - name : build
154167 run : |
155168 ./ci/linux/build_python_package.sh
0 commit comments