Skip to content

Commit

Permalink
mcb-update-actions - Reorganise cache action
Browse files Browse the repository at this point in the history
  • Loading branch information
M-casado committed Jun 24, 2024
1 parent e5811d2 commit 96b93c1
Showing 4 changed files with 28 additions and 29 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/check_project_version_change.yml
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ jobs:
python-version: '3.x'

- name: Cache pip
uses: actions/cache@v3
uses: actions/cache@v4
with:
# On subsequent runs, if the cache key matches (i.e., operating system and the hash of the requirements.txt file),
# the dependencies are restored from the cache instead of being downloaded and installed again.
@@ -53,6 +53,8 @@ jobs:
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
# If there is no cache for this key, we create it at the end of the run, even if there was an error mid-way
save-always: true

- name: Install dependencies
run: |
4 changes: 3 additions & 1 deletion .github/workflows/json_validation_against_EGA_API.yml
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ jobs:
python-version: '3.x'

- name: Cache pip
uses: actions/cache@v3
uses: actions/cache@v4
with:
# On subsequent runs, if the cache key matches (i.e., operating system and the hash of the requirements.txt file),
# the dependencies are restored from the cache instead of being downloaded and installed again.
@@ -49,6 +49,8 @@ jobs:
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
# If there is no cache for this key, we create it at the end of the run, even if there was an error mid-way
save-always: true

- name: Install dependencies
run: |
45 changes: 19 additions & 26 deletions .github/workflows/json_validation_deploying_biovalidator.yml
Original file line number Diff line number Diff line change
@@ -39,6 +39,25 @@ jobs:
with:
fetch-depth: 0

- uses: actions/setup-python@v4
with:
# We'll use the latest version of python from major 3 release
# This bit is needed for running the following python script
python-version: '3.x'

- name: Cache pip
uses: actions/cache@v4
with:
# On subsequent runs, if the cache key matches (i.e., operating system and the hash of the requirements.txt file),
# the dependencies are restored from the cache instead of being downloaded and installed again.
path: ~/.cache/pip
# combines the OS type and a hash of the requirements.txt file: the cache is specific to the dependencies listed
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
# If there is no cache for this key, we create it at the end of the run, even if there was an error mid-way
save-always: true

- name: Clone Biovalidator
# See https://github.com/elixir-europe/biovalidator#installation
# We want to test the "main" branch of the project
@@ -75,25 +94,6 @@ jobs:
exit 1
fi
- uses: actions/setup-python@v4
with:
# We'll use the latest version of python from major 3 release
# This bit is needed for running the following python script
python-version: '3.x'

- name: Cache pip
uses: actions/cache@v4
with:
# On subsequent runs, if the cache key matches (i.e., operating system and the hash of the requirements.txt file),
# the dependencies are restored from the cache instead of being downloaded and installed again.
path: ~/.cache/pip
# combines the OS type and a hash of the requirements.txt file: the cache is specific to the dependencies listed
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
# If there is no cache for this key, we create it at the end of the run, even if there was an error mid-way
save-always: true

- name: Install dependencies
run: |
pip install --upgrade pip
@@ -106,13 +106,6 @@ jobs:
# Check:
# github.com/EbiEga/ega-metadata-schema/tree/main/.github/scripts
run: |
#!
if curl --output /dev/null --silent --head --fail "http://localhost:3020/validate"; then
echo "Biovalidator server is up!"
else
echo "Biovalidator went down"
fi
#!
json_ex_dir="./examples/json_validation_tests"
# The following URL points to the locally deployed server of
# Biovalidator
4 changes: 3 additions & 1 deletion .github/workflows/update_version_manifest.yml
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ jobs:
python-version: '3.x'

- name: Cache pip
uses: actions/cache@v3
uses: actions/cache@v4
with:
# On subsequent runs, if the cache key matches (i.e., operating system and the hash of the requirements.txt file),
# the dependencies are restored from the cache instead of being downloaded and installed again.
@@ -50,6 +50,8 @@ jobs:
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
# If there is no cache for this key, we create it at the end of the run, even if there was an error mid-way
save-always: true

- name: Install dependencies
run: |

0 comments on commit 96b93c1

Please sign in to comment.