@@ -19,17 +19,18 @@ jobs:
19
19
with :
20
20
python-version : " 3.11"
21
21
cache : ' pip'
22
- # - name: Cache virtualenv
23
- # uses: actions/cache@v3
24
- # with:
25
- # key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version}}-${{ hashFiles('requirements.txt') }}
26
- # path: .venv
22
+ - name : Cache pip
23
+ uses : actions/cache@v3
24
+ id : pip-cache
25
+ with :
26
+ key : ${{ env.pythonLocation }}-pip-${{ hashFiles('**/requirements.txt') }}
27
+ path : ${{ env.pythonLocation }}
28
+ if : steps.python-cache.outputs.cache-hit != 'true'
29
+
27
30
- name : Install dependencies
28
31
run : |
29
- python -m venv .venv
30
- source .venv/bin/activate
31
- python -m pip install -r requirements.txt
32
- python -m pip install pytest
32
+ pip install -r requirements.txt
33
+
33
34
- name : Read algorithms
34
35
id : algorithms
35
36
run : |
@@ -59,20 +60,16 @@ jobs:
59
60
with :
60
61
python-version : " 3.11"
61
62
cache : ' pip'
62
- # - name: Cache virtualenv
63
- # uses: actions/cache@v3
64
- # with:
65
- # key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version}}-${{ hashFiles('requirements.txt') }}
66
- # path: .venv
67
- - name : Install dependencies
68
- run : |
69
- python -m venv .venv
70
- source .venv/bin/activate
71
- python -m pip install -r requirements.txt
72
- python -m pip install pytest
63
+ - name : Cache pip
64
+ id : python-cache
65
+ uses : actions/cache@v3
66
+ with :
67
+ key : ${{ env.pythonLocation }}-pip-${{ hashFiles('**/requirements.txt') }}
68
+ path : ${{ env.pythonLocation }}
69
+ if : steps.python-cache.outputs.cache-hit != 'true'
70
+
73
71
- name : Generate fitting data
74
72
run : |
75
- source .venv/bin/activate
76
73
python -m pytest -m slow --selectAlgorithm ${{ matrix.algorithm }} --saveFileName test_output_${{ matrix.algorithm }}_${{ matrix.SNR }}.csv --SNR ${{ matrix.SNR }} --fitCount 300 --saveDurationFileName test_duration_${{ matrix.algorithm }}_${{ matrix.SNR }}.csv
77
74
- name : Upload raw data
78
75
uses : actions/upload-artifact@v3
0 commit comments