Further check mode fixes #166
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: molecule test | |
on: | |
pull_request: | |
branches: | |
- main | |
types: [opened, synchronize, reopened] | |
paths: | |
- 'defaults/**' | |
- 'handlers/**' | |
- 'molecule/**' | |
- 'tasks/**' | |
- 'templates/**' | |
- 'vars/**' | |
schedule: | |
- cron: '0 1 1 * *' | |
workflow_dispatch: | |
jobs: | |
standalone: | |
name: Single node setup | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: ${{ !contains(github.event_name, 'pull_request') }} | |
matrix: | |
config: | |
- image: "rockylinux9" | |
cgroup_mode: "host" | |
volumes: "rw" | |
- image: "ubuntu2404" | |
cgroup_mode: "host" | |
volumes: "rw" | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
path: 'lablabs.rke2' | |
- name: Set up Python 3 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install test dependencies | |
run: pip3 install ansible docker molecule molecule-plugins[docker] "requests<2.29.2" | |
- name: Run Molecule tests | |
run: molecule test | |
working-directory: ./lablabs.rke2 | |
env: | |
PY_COLORS: '1' | |
ANSIBLE_FORCE_COLOR: '1' | |
MOLECULE_IMAGE: ${{ matrix.config.image }} | |
MOLECULE_DOCKER_CGROUPS_MODE: ${{ matrix.config.cgroup_mode }} | |
MOLECULE_DOCKER_VOLUMES: ${{ matrix.config.volumes }} | |
cluster: | |
name: Cluster setup | |
if: ${{ github.event_name == 'pull_request' || github.event_name == 'schedule' }} | |
runs-on: ubuntu-22.04 | |
needs: standalone | |
strategy: | |
matrix: | |
config: | |
- image: "ubuntu2404" | |
cgroup_mode: "host" | |
volumes: "rw" | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
path: 'lablabs.rke2' | |
- name: Set up Python 3 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install test dependencies | |
run: pip3 install ansible docker molecule molecule-plugins[docker] "requests<2.29.2" | |
- name: Run Molecule tests | |
run: molecule test --scenario-name cluster | |
working-directory: ./lablabs.rke2 | |
env: | |
PY_COLORS: '1' | |
ANSIBLE_FORCE_COLOR: '1' | |
MOLECULE_IMAGE: ${{ matrix.config.image }} | |
MOLECULE_TAG: ${{ matrix.config.tag }} | |
MOLECULE_DOCKER_CGROUPS_MODE: ${{ matrix.config.cgroup_mode }} | |
# TODO: Fix HA Cluster molecule tests (dind deployment is failing from version 1.22.15+rke2r1) | |
# | |
# ha_cluster: | |
# name: HA Cluster setup | |
# if: ${{ github.event_name == 'pull_request' || github.event_name == 'schedule' }} | |
# runs-on: ubuntu-22.04 | |
# needs: cluster | |
# strategy: | |
# matrix: | |
# config: | |
# - image: "ubuntu2204" | |
# cgroup_mode: "host" | |
# volumes: "rw" | |
# steps: | |
# - name: checkout | |
# uses: actions/checkout@v4 | |
# with: | |
# path: 'lablabs.rke2' | |
# - name: Set up Python 3 | |
# uses: actions/setup-python@v5 | |
# with: | |
# python-version: '3.x' | |
# - name: Install test dependencies | |
# run: pip3 install ansible docker molecule molecule-plugins[docker] "requests<2.29.2" | |
# - name: Increase nf_conntrack_max | |
# run: sudo sysctl -w net.netfilter.nf_conntrack_max=393216 | |
# - name: Run Molecule tests | |
# run: molecule test --scenario-name ha_cluster | |
# working-directory: ./lablabs.rke2 | |
# env: | |
# PY_COLORS: '1' | |
# ANSIBLE_FORCE_COLOR: '1' | |
# MOLECULE_IMAGE: ${{ matrix.config.image }} | |
# MOLECULE_TAG: ${{ matrix.config.tag }} | |
# MOLECULE_DOCKER_CGROUPS_MODE: ${{ matrix.config.cgroup_mode }} | |
# ha_cluster_kubevip: | |
# name: HA Cluster kube-vip setup | |
# if: ${{ github.event_name == 'pull_request' || github.event_name == 'schedule' }} | |
# runs-on: ubuntu-22.04 | |
# needs: cluster | |
# strategy: | |
# matrix: | |
# config: | |
# - image: "ubuntu2204" | |
# cgroup_mode: "host" | |
# volumes: "rw" | |
# steps: | |
# - name: checkout | |
# uses: actions/checkout@v4 | |
# with: | |
# path: 'lablabs.rke2' | |
# - name: Set up Python 3 | |
# uses: actions/setup-python@v5 | |
# with: | |
# python-version: '3.x' | |
# - name: Install test dependencies | |
# run: pip3 install ansible docker molecule molecule-plugins[docker] "requests<2.29.2" | |
# - name: Increase nf_conntrack_max | |
# run: sudo sysctl -w net.netfilter.nf_conntrack_max=393216 | |
# - name: Run Molecule tests | |
# run: molecule test --scenario-name ha_cluster_kubevip | |
# working-directory: ./lablabs.rke2 | |
# env: | |
# PY_COLORS: '1' | |
# ANSIBLE_FORCE_COLOR: '1' | |
# MOLECULE_IMAGE: ${{ matrix.config.image }} | |
# MOLECULE_TAG: ${{ matrix.config.tag }} | |
# MOLECULE_DOCKER_CGROUPS_MODE: ${{ matrix.config.cgroup_mode }} |