fix(ci): adjusting cache steps

This commit is contained in:
Timothy Stewart
2024-01-21 15:11:38 -06:00
parent f07009e0c5
commit 4b4922e1b6
5 changed files with 22 additions and 17 deletions

View File

@@ -15,6 +15,20 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # 2.3.3
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip' # caching pip dependencies
- name: Cache Ansible
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0
with:
path: ~/.ansible/collections
key: ${{ runner.os }}-ansible-${{ hashFiles('collections/requirements.txt') }}
restore-keys: |
${{ runner.os }}-ansible-
- name: Update Homebrew
run: |
brew update --preinstall

View File

@@ -8,11 +8,11 @@ on:
paths-ignore:
- '**/README.md'
jobs:
lint:
uses: ./.github/workflows/lint.yml
cache:
uses: ./.github/workflows/cache.yml
needs: [lint]
lint:
uses: ./.github/workflows/lint.yml
needs: [cache]
test:
uses: ./.github/workflows/test.yml
needs: [lint, cache]
needs: [cache, lint]

View File

@@ -21,13 +21,11 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip' # caching pip dependencies
- name: Cache Ansible
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0
- name: Restore Ansible cache
uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0
with:
path: ~/.ansible/collections
key: ${{ runner.os }}-ansible-${{ hashFiles('collections/requirements.txt') }}
restore-keys: |
${{ runner.os }}-ansible-
- name: Install dependencies
run: |

View File

@@ -58,13 +58,6 @@ jobs:
* fdad:bad:ba55::/64
EOF
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # 2.3.3
id: pip-cache
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip' # caching pip dependencies
- name: Install dependencies
run: |
echo "::group::Upgrade pip"
@@ -89,7 +82,7 @@ jobs:
env:
ANSIBLE_K3S_LOG_DIR: ${{ runner.temp }}/logs/k3s-ansible/${{ matrix.scenario }}
ANSIBLE_SSH_RETRIES: 4
ANSIBLE_TIMEOUT: 60
ANSIBLE_TIMEOUT: 120
PY_COLORS: 1
ANSIBLE_FORCE_COLOR: 1

View File

@@ -1,6 +1,6 @@
---
# Timeout to wait for MetalLB services to come up
metal_lb_available_timeout: 120s
metal_lb_available_timeout: 240s
# Name of the master group
group_name_master: master