forked from tim/k3s-ansible
fix(ci): pin + cache
This commit is contained in:
25
.github/workflows/test.yml
vendored
25
.github/workflows/test.yml
vendored
@@ -34,8 +34,16 @@ 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@fd5de65bc895cf536527842281bea11763fefd77 # 3.0.8
|
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # 3.0.11
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.vagrant.d/boxes
|
~/.vagrant.d/boxes
|
||||||
@@ -50,14 +58,19 @@ 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@v2
|
uses: actions/setup-python@13ae5bb136fac2878aff31522b9efb785519f984 # 4.3.0
|
||||||
with:
|
with:
|
||||||
python-version: ${{ env.PYTHON_VERSION }}
|
python-version: ${{ env.PYTHON_VERSION }}
|
||||||
|
cache: 'pip' # caching pip dependencies
|
||||||
|
|
||||||
- name: Install dependencies
|
run: |
|
||||||
run: >-
|
echo "::group::Upgrade pip"
|
||||||
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 }}
|
||||||
@@ -70,7 +83,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@3cea5372237819ed00197afe530f5a7ea3e805c8 # 3.1.0
|
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # 3.1.1
|
||||||
with:
|
with:
|
||||||
name: logs
|
name: logs
|
||||||
path: |
|
path: |
|
||||||
|
|||||||
Reference in New Issue
Block a user