-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add restore to rest of the workflows
- Loading branch information
Showing
4 changed files
with
67 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ jobs: | |
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Restore Python environment cache | ||
id: restore-env | ||
uses: actions/cache/restore@v4 | ||
|
@@ -52,6 +53,7 @@ jobs: | |
uses: pierotofy/set-swap-space@master | ||
with: | ||
swap-size-gb: 10 | ||
|
||
- name: Test with pytest | ||
run: | | ||
source .venv-${{ matrix.python-version }}/bin/activate | ||
|
@@ -69,6 +71,7 @@ jobs: | |
--group ${{ matrix.group }} \ | ||
--splitting-algorithm least_duration \ | ||
--db ./prof.db | ||
- name: save coverage file and plot comparison results | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
|
@@ -78,6 +81,7 @@ jobs: | |
./cov.xml | ||
./mpl_results.html | ||
./prof.db | ||
- name: Upload coverage | ||
id : codecov | ||
uses: Wandalen/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,13 +35,31 @@ jobs: | |
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.combos.python_version }} | ||
|
||
- name: Restore Python environment cache | ||
id: restore-env | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: .venv-${{ matrix.combos.python_version }} | ||
key: ${{ runner.os }}-venv-${{ matrix.combos.python_version }}-${{ hashFiles('devtools/dev-requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-venv-${{ matrix.combos.python_version }}- | ||
- name: Check if virtual environment exists | ||
if: steps.restore-env.outputs.cache-hit != 'true' | ||
run: | | ||
echo "Error: Virtual environment .venv-${{ matrix.combos.python_version }} not found!" | ||
exit 1 | ||
- name: Activate virtual environment | ||
run: | | ||
source .venv-${{ matrix.combos.python_version }}/bin/activate | ||
- name: Set Swap Space | ||
uses: pierotofy/set-swap-space@master | ||
with: | ||
swap-size-gb: 10 | ||
|
||
- name: Test with pytest | ||
run: | | ||
pwd | ||
|
@@ -58,6 +76,7 @@ jobs: | |
--group ${{ matrix.combos.group }} \ | ||
--splitting-algorithm least_duration \ | ||
--db ./prof.db | ||
- name: save coverage file and plot comparison results | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
|
@@ -67,6 +86,7 @@ jobs: | |
./cov.xml | ||
./mpl_results.html | ||
./prof.db | ||
- name: Upload coverage | ||
id : codecov | ||
uses: Wandalen/[email protected] | ||
|