-
Notifications
You must be signed in to change notification settings - Fork 901
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add update cache step whenever a branch is merged to master
- Loading branch information
1 parent
79807f1
commit 993b579
Showing
4 changed files
with
98 additions
and
63 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: update-cache | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
# This workflow updates the python environment cache so that other workflows in different branches have access to it | ||
build-cache: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [macos-13, ubuntu-latest] | ||
python-version: ['3.9'] | ||
flavour: ['all'] | ||
|
||
steps: | ||
- name: "Clone repository" | ||
uses: actions/checkout@v4 | ||
|
||
- name: "Set up Python ${{ matrix.python-version }}" | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: "Cache python environment" | ||
uses: actions/cache@v4 | ||
id: pythonenv-cache | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('requirements/*.txt') }} | ||
|
||
- name: "Setup Pip" | ||
run: | | ||
python -m pip install --upgrade pip | ||
- name: "Install Latest Dependencies" | ||
run: | | ||
# install latest dependencies (potentially updating cached dependencies) | ||
pip install -U -r requirements/dev-all.txt |