mirror of
https://github.com/techno-tim/k3s-ansible.git
synced 2025-12-28 19:52:40 +01:00
fix(ci): fix molecule
This commit is contained in:
28
.github/workflows/cache.yml
vendored
28
.github/workflows/cache.yml
vendored
@@ -21,14 +21,14 @@ jobs:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
cache: 'pip' # caching pip dependencies
|
||||
|
||||
- name: Cache Ansible
|
||||
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0
|
||||
id: cache-ansible
|
||||
with:
|
||||
path: ~/.ansible/collections
|
||||
key: ansible-${{ hashFiles('collections/requirements.yml') }}
|
||||
restore-keys: |
|
||||
ansible-
|
||||
# - name: Cache Ansible
|
||||
# uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0
|
||||
# id: cache-ansible
|
||||
# with:
|
||||
# path: ~/.ansible/collections
|
||||
# key: ansible-${{ hashFiles('collections/requirements.yml') }}
|
||||
# restore-keys: |
|
||||
# ansible-
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
@@ -40,12 +40,12 @@ jobs:
|
||||
python3 -m pip install -r requirements.txt
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Install ansible dependencies
|
||||
if: steps.cache-ansible.outputs.cache-hit != 'true' # only run if false since this is just a cache step
|
||||
run: |
|
||||
echo "::group::Install Ansible role requirements from collections/requirements.yml"
|
||||
ansible-galaxy install -r collections/requirements.yml
|
||||
echo "::endgroup::"
|
||||
# - name: Install ansible dependencies
|
||||
# if: steps.cache-ansible.outputs.cache-hit != 'true' # only run if false since this is just a cache step
|
||||
# run: |
|
||||
# echo "::group::Install Ansible role requirements from collections/requirements.yml"
|
||||
# ansible-galaxy install -r collections/requirements.yml
|
||||
# echo "::endgroup::"
|
||||
|
||||
- name: Cache Vagrant boxes
|
||||
id: cache-vagrant
|
||||
|
||||
4
.github/workflows/lint.yml
vendored
4
.github/workflows/lint.yml
vendored
@@ -37,10 +37,6 @@ jobs:
|
||||
python3 -m pip install -r requirements.txt
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Install Ansible role requirements from collections/requirements.yml"
|
||||
ansible-galaxy install -r collections/requirements.yml
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Run pre-commit
|
||||
uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507 # 3.0.0
|
||||
|
||||
|
||||
29
.github/workflows/test.yml
vendored
29
.github/workflows/test.yml
vendored
@@ -22,11 +22,18 @@ jobs:
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
|
||||
- name: Restore Ansible cache
|
||||
uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0
|
||||
with:
|
||||
path: ~/.ansible/collections
|
||||
key: ansible-${{ hashFiles('collections/requirements.yml') }}
|
||||
# - name: Restore Ansible cache
|
||||
# uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0
|
||||
# with:
|
||||
# path: ~/.ansible/collections
|
||||
# key: ansible-${{ hashFiles('collections/requirements.yml') }}
|
||||
- name: Configure VirtualBox
|
||||
run: |-
|
||||
sudo mkdir -p /etc/vbox
|
||||
cat <<EOF | sudo tee -a /etc/vbox/networks.conf > /dev/null
|
||||
* 192.168.30.0/24
|
||||
* fdad:bad:ba55::/64
|
||||
EOF
|
||||
|
||||
- name: Set up Python ${{ env.PYTHON_VERSION }}
|
||||
uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # 2.3.3
|
||||
@@ -56,14 +63,6 @@ jobs:
|
||||
key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }}
|
||||
fail-on-cache-miss: true
|
||||
|
||||
- name: Configure VirtualBox
|
||||
run: |-
|
||||
sudo mkdir -p /etc/vbox
|
||||
cat <<EOF | sudo tee -a /etc/vbox/networks.conf > /dev/null
|
||||
* 192.168.30.0/24
|
||||
* fdad:bad:ba55::/64
|
||||
EOF
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
echo "::group::Upgrade pip"
|
||||
@@ -74,10 +73,6 @@ jobs:
|
||||
python3 -m pip install -r requirements.txt
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Install Ansible role requirements from collections/requirements.yml"
|
||||
ansible-galaxy install -r collections/requirements.yml
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Test with molecule
|
||||
run: molecule test --scenario-name ${{ matrix.scenario }}
|
||||
timeout-minutes: 90
|
||||
|
||||
Reference in New Issue
Block a user