Check version. #356
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
--- | |
# | |
# Ansible managed | |
# | |
name: Ansible Molecule | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
schedule: | |
- cron: '3 2 2 * *' | |
jobs: | |
lint: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: ansible-lint | |
uses: ansible-community/ansible-lint-action@main | |
test: | |
needs: | |
- lint | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- image: "alpine" | |
tag: "latest" | |
- image: "amazonlinux" | |
tag: "latest" | |
- image: "enterpriselinux" | |
tag: "8" | |
- image: "enterpriselinux" | |
tag: "latest" | |
- image: "debian" | |
tag: "latest" | |
- image: "debian" | |
tag: "bullseye" | |
- image: "fedora" | |
tag: "39" | |
- image: "fedora" | |
tag: "latest" | |
- image: "fedora" | |
tag: "rawhide" | |
- image: "opensuse" | |
tag: "latest" | |
- image: "ubuntu" | |
tag: "latest" | |
- image: "ubuntu" | |
tag: "jammy" | |
- image: "ubuntu" | |
tag: "focal" | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
# with: | |
# path: "${{ github.repository }}" | |
- name: Debug | |
run: | | |
pwd | |
ls -la | |
# - name: molecule | |
# uses: robertdebock/molecule-action@6.0.1 | |
# with: | |
# image: ${{ matrix.config.image }} | |
# tag: ${{ matrix.config.tag }} | |
- name: Set up Python 3. | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
# pip install molecule molecule-plugins[docker] docker ansible | |
pip install -r requirements.txt | |
- name: python | version | |
run: python --version | |
- name: docker | ps | |
run: docker ps -a | |
- name: molecule | create | |
run: molecule create | |
env: | |
image: ${{ matrix.config.image }} | |
tag: ${{ matrix.config.tag }} | |
- name: docker | ps | |
run: docker ps -a | |
- name: docker | inspect | |
run: docker inspect $(docker ps -qa) | |
- name: molecule | list | |
run: molecule list | |
env: | |
image: ${{ matrix.config.image }} | |
tag: ${{ matrix.config.tag }} | |
- name: molecule | prepare | |
run: molecule prepare | |
env: | |
image: ${{ matrix.config.image }} | |
tag: ${{ matrix.config.tag }} | |
- name: docker | ps | |
run: docker ps -a | |
- name: molecule | list | |
run: molecule list | |
env: | |
image: ${{ matrix.config.image }} | |
tag: ${{ matrix.config.tag }} | |
- name: molecule | converge | |
run: molecule converge | |
env: | |
image: ${{ matrix.config.image }} | |
tag: ${{ matrix.config.tag }} | |
- name: docker | ps | |
run: docker ps -a | |
- name: molecule | list | |
run: molecule list | |
env: | |
image: ${{ matrix.config.image }} | |
tag: ${{ matrix.config.tag }} | |
- name: molecule | idempotence | |
run: molecule idempotence | |
env: | |
image: ${{ matrix.config.image }} | |
tag: ${{ matrix.config.tag }} | |
- name: docker | ps | |
run: docker ps -a | |
- name: molecule | list | |
run: molecule list | |
env: | |
image: ${{ matrix.config.image }} | |
tag: ${{ matrix.config.tag }} | |
- name: molecule | verify | |
run: molecule verify | |
env: | |
image: ${{ matrix.config.image }} | |
tag: ${{ matrix.config.tag }} | |
- name: docker | ps | |
run: docker ps -a | |
- name: molecule | list | |
run: molecule list | |
env: | |
image: ${{ matrix.config.image }} | |
tag: ${{ matrix.config.tag }} | |
- name: molecule | destroy | |
run: molecule destroy | |
env: | |
image: ${{ matrix.config.image }} | |
tag: ${{ matrix.config.tag }} |