fix(ci): pin + cache

This commit is contained in:
Timothy Stewart
2022-11-01 21:03:27 -05:00
parent 77ac928c0d
commit 6a83cde0c6

View File

@@ -36,16 +36,8 @@ jobs:
* fdad:bad:ba55::/64 * fdad:bad:ba55::/64
EOF EOF
- name: Cache pip
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # 3.0.11
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('./requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache Vagrant boxes - name: Cache Vagrant boxes
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # 3.0.11 uses: actions/cache@fd5de65bc895cf536527842281bea11763fefd77 # 3.0.8
with: with:
path: | path: |
~/.vagrant.d/boxes ~/.vagrant.d/boxes
@@ -60,19 +52,14 @@ jobs:
run: ./.github/download-boxes.sh run: ./.github/download-boxes.sh
- name: Set up Python ${{ env.PYTHON_VERSION }} - name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@13ae5bb136fac2878aff31522b9efb785519f984 # 4.3.0 uses: actions/setup-python@v2
with: with:
python-version: ${{ env.PYTHON_VERSION }} python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip' # caching pip dependencies
run: | - name: Install dependencies
echo "::group::Upgrade pip" run: >-
python3 -m pip install --upgrade pip python3 -m pip install --upgrade pip &&
echo "::endgroup::"
echo "::group::Install Python requirements from requirements.txt"
python3 -m pip install -r requirements.txt python3 -m pip install -r requirements.txt
echo "::endgroup::"
- name: Test with molecule - name: Test with molecule
run: molecule test --scenario-name ${{ matrix.scenario }} run: molecule test --scenario-name ${{ matrix.scenario }}
@@ -85,7 +72,7 @@ jobs:
- name: Upload log files - name: Upload log files
if: always() # do this even if a step before has failed if: always() # do this even if a step before has failed
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # 3.1.1 uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # 3.1.0
with: with:
name: logs name: logs
path: | path: |