Skip to content

Commit

Permalink
Merge pull request galaxyproject#18789 from nsoranzo/CI_python_caches
Browse files Browse the repository at this point in the history
Cache pip directory as part of `setup-python` action
  • Loading branch information
mvdbeek authored Sep 9, 2024
2 parents 8d9fc6b + d3c369f commit cdfb31c
Show file tree
Hide file tree
Showing 24 changed files with 55 additions and 137 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,12 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'galaxy root/requirements.txt'
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
- name: Cache pip dir
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }}
- name: Cache galaxy venv
uses: actions/cache@v4
with:
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/check_test_class_names.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip dir
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }}
cache: 'pip'
cache-dependency-path: 'requirements.txt'
- name: Install Python dependencies
run: pip install -r requirements.txt -r lib/galaxy/dependencies/dev-requirements.txt
- name: Run tests
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/converter_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,8 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache venv dir
uses: actions/cache@v4
id: pip-cache
with:
path: ~/.cache/pip
key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }}
cache: 'pip'
cache-dependency-path: 'galaxy root/requirements.txt'
- name: Move test data
run: rsync -av --remove-source-files --exclude .git galaxy-test-data/ 'galaxy root/test-data/'
- name: Install planemo
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/cwl_conformance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,12 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'galaxy root/requirements.txt'
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
- name: Cache pip dir
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }}
- name: Cache galaxy venv
uses: actions/cache@v4
with:
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/db_indexes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,12 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'galaxy root/requirements.txt'
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
- name: Cache pip dir
uses: actions/cache@v4
id: pip-cache
with:
path: ~/.cache/pip
key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }}
- name: Cache tox env
uses: actions/cache@v4
with:
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,8 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip dir
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }}
cache: 'pip'
cache-dependency-path: 'requirements.txt'
- uses: nanasess/setup-chromedriver@v2
- name: Run tests
run: bash ./test/deployment/usegalaxystar.bash
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,8 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip dir
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }}
cache: 'pip'
cache-dependency-path: 'requirements.txt'
- name: Install Python dependencies
run: pip install -r requirements.txt -r lib/galaxy/dependencies/dev-requirements.txt sphinxcontrib-simpleversioning
- name: Add Google Analytics to doc/source/conf.py
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/first_startup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,12 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'galaxy root/requirements.txt'
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
- name: Cache pip dir
uses: actions/cache@v4
id: pip-cache
with:
path: ~/.cache/pip
key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }}
- name: Cache tox env
uses: actions/cache@v4
with:
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/framework_tools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,12 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'galaxy root/requirements.txt'
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
- name: Cache pip dir
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }}
- name: Cache galaxy venv
uses: actions/cache@v4
with:
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/framework_workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,12 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'galaxy root/requirements.txt'
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
- name: Cache pip dir
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }}
- name: Cache galaxy venv
uses: actions/cache@v4
with:
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,12 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'galaxy root/requirements.txt'
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
- name: Cache pip dir
uses: actions/cache@v4
id: pip-cache
with:
path: ~/.cache/pip
key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }}
- name: Cache galaxy venv
uses: actions/cache@v4
with:
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/integration_selenium.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,12 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'galaxy root/requirements.txt'
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
- name: Cache pip dir
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }}
- name: Cache galaxy venv
uses: actions/cache@v4
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: |
${{ env.LINT_PATH }}
${{ env.TYPE_PATH }}
${{ env.CORE_PATH }}
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
- name: Cache pip dir
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-cache-${{ matrix.python-version }}-${{ hashFiles(env.LINT_PATH, env.TYPE_PATH, env.CORE_PATH) }}
- name: Cache tox env
uses: actions/cache@v4
with:
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/lint_openapi_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,20 @@ jobs:
- uses: actions/checkout@v4
with:
path: 'galaxy root'
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/setup-node@v4
with:
node-version: '18.12.1'
cache: 'yarn'
cache-dependency-path: 'galaxy root/client/yarn.lock'
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'galaxy root/requirements.txt'
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
- name: Cache pip dir
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }}
- name: Cache galaxy venv
uses: actions/cache@v4
with:
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/mulled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,12 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'galaxy root/requirements.txt'
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
- name: Cache pip dir
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }}
- name: Cache tox env
uses: actions/cache@v4
with:
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/osx_startup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,11 @@ jobs:
node-version: '18.12.1'
cache: 'yarn'
cache-dependency-path: 'galaxy root/client/yarn.lock'
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
- name: Cache pip dir
uses: actions/cache@v4
id: pip-cache
with:
path: ~/Library/Caches/pip
key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }}
- name: Cache tox env
uses: actions/cache@v4
with:
path: .tox
key: tox-cache-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-osx
- name: Install miniforge # use this job to test using Python from a conda environment
uses: conda-incubator/setup-miniconda@v3
with:
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/performance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,12 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'galaxy root/requirements.txt'
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
- name: Cache pip dir
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }}
- name: Cache galaxy venv
uses: actions/cache@v4
with:
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/reports_startup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,12 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'galaxy root/requirements.txt'
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
- name: Cache pip dir
uses: actions/cache@v4
id: pip-cache
with:
path: ~/.cache/pip
key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }}
- name: Cache galaxy venv
uses: actions/cache@v4
with:
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/selenium.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,12 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'galaxy root/requirements.txt'
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
- name: Cache pip dir
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }}
- name: Cache galaxy venv
uses: actions/cache@v4
with:
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/test_galaxy_packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,8 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip dir
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }}
cache: 'pip'
cache-dependency-path: 'galaxy root/requirements.txt'
- name: Install ffmpeg
run: sudo apt-get update && sudo apt-get -y install ffmpeg
- name: Install tox
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/test_galaxy_packages_for_pulsar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,8 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip dir
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }}
cache: 'pip'
cache-dependency-path: 'galaxy root/requirements.txt'
- name: Install Apptainer's singularity
uses: eWaterCycle/setup-apptainer@v2
- name: Install ffmpeg
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/toolshed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,12 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'galaxy root/requirements.txt'
- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c 'import sys; print("-".join(str(v) for v in sys.version_info))')" >> $GITHUB_OUTPUT
- name: Cache pip dir
uses: actions/cache@v4
id: pip-cache
with:
path: ~/.cache/pip
key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }}
- name: Cache galaxy venv
uses: actions/cache@v4
with:
Expand Down
Loading

0 comments on commit cdfb31c

Please sign in to comment.