mirror of
https://github.com/techno-tim/k3s-ansible.git
synced 2025-12-28 11:42:37 +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 }}
|
python-version: ${{ env.PYTHON_VERSION }}
|
||||||
cache: 'pip' # caching pip dependencies
|
cache: 'pip' # caching pip dependencies
|
||||||
|
|
||||||
- name: Cache Ansible
|
# - name: Cache Ansible
|
||||||
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0
|
# uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0
|
||||||
id: cache-ansible
|
# id: cache-ansible
|
||||||
with:
|
# with:
|
||||||
path: ~/.ansible/collections
|
# path: ~/.ansible/collections
|
||||||
key: ansible-${{ hashFiles('collections/requirements.yml') }}
|
# key: ansible-${{ hashFiles('collections/requirements.yml') }}
|
||||||
restore-keys: |
|
# restore-keys: |
|
||||||
ansible-
|
# ansible-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
@@ -40,12 +40,12 @@ jobs:
|
|||||||
python3 -m pip install -r requirements.txt
|
python3 -m pip install -r requirements.txt
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
- name: Install ansible dependencies
|
# - name: Install ansible dependencies
|
||||||
if: steps.cache-ansible.outputs.cache-hit != 'true' # only run if false since this is just a cache step
|
# if: steps.cache-ansible.outputs.cache-hit != 'true' # only run if false since this is just a cache step
|
||||||
run: |
|
# run: |
|
||||||
echo "::group::Install Ansible role requirements from collections/requirements.yml"
|
# echo "::group::Install Ansible role requirements from collections/requirements.yml"
|
||||||
ansible-galaxy install -r collections/requirements.yml
|
# ansible-galaxy install -r collections/requirements.yml
|
||||||
echo "::endgroup::"
|
# echo "::endgroup::"
|
||||||
|
|
||||||
- name: Cache Vagrant boxes
|
- name: Cache Vagrant boxes
|
||||||
id: cache-vagrant
|
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
|
python3 -m pip install -r requirements.txt
|
||||||
echo "::endgroup::"
|
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
|
- name: Run pre-commit
|
||||||
uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507 # 3.0.0
|
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:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
|
||||||
- name: Restore Ansible cache
|
# - name: Restore Ansible cache
|
||||||
uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0
|
# uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0
|
||||||
with:
|
# with:
|
||||||
path: ~/.ansible/collections
|
# path: ~/.ansible/collections
|
||||||
key: ansible-${{ hashFiles('collections/requirements.yml') }}
|
# 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 }}
|
- name: Set up Python ${{ env.PYTHON_VERSION }}
|
||||||
uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # 2.3.3
|
uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # 2.3.3
|
||||||
@@ -56,14 +63,6 @@ jobs:
|
|||||||
key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }}
|
key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }}
|
||||||
fail-on-cache-miss: true
|
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
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
echo "::group::Upgrade pip"
|
echo "::group::Upgrade pip"
|
||||||
@@ -74,10 +73,6 @@ jobs:
|
|||||||
python3 -m pip install -r requirements.txt
|
python3 -m pip install -r requirements.txt
|
||||||
echo "::endgroup::"
|
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
|
- name: Test with molecule
|
||||||
run: molecule test --scenario-name ${{ matrix.scenario }}
|
run: molecule test --scenario-name ${{ matrix.scenario }}
|
||||||
timeout-minutes: 90
|
timeout-minutes: 90
|
||||||
|
|||||||
Reference in New Issue
Block a user