diff --git a/.github/workflows/Integrate.yml b/.github/workflows/Integrate.yml index f9e00a5..cfc93e8 100644 --- a/.github/workflows/Integrate.yml +++ b/.github/workflows/Integrate.yml @@ -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 diff --git a/molecule/requirements.txt b/molecule/requirements.txt new file mode 100644 index 0000000..735f55f --- /dev/null +++ b/molecule/requirements.txt @@ -0,0 +1,6 @@ +ansible==4.* +ansible-lint +yamllint +molecule +python-vagrant +molecule-vagrant