Skip to content

Commit

Permalink
Merge pull request #256 from lemberg/chore/faster-ci
Browse files Browse the repository at this point in the history
Improve caching of Python dependencies
  • Loading branch information
T2L committed Nov 16, 2021
2 parents 3538272 + b9cc586 commit d804bc4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/Integrate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,25 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Get PiP Cache Directory
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache PiP dependencies
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('./molecule/requirements.txt') }}

- name: Cache Python environment
uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ matrix.molecule-platform }}
key: ${{ env.pythonLocation }}-${{ hashFiles('./molecule/requirements.txt') }}

- name: Install Molecule and it's dependencies
run: pip install --upgrade --upgrade-strategy eager ansible==4.* ansible-lint yamllint molecule python-vagrant molecule-vagrant
run: pip install --upgrade --upgrade-strategy eager --requirement ./molecule/requirements.txt

- name: Run Molecule tests
run: molecule test
Expand Down
6 changes: 6 additions & 0 deletions molecule/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ansible==4.*
ansible-lint
yamllint
molecule
python-vagrant
molecule-vagrant

0 comments on commit d804bc4

Please sign in to comment.