Skip to content

Commit

Permalink
update to the github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Anderson committed Mar 5, 2024
1 parent af3341b commit f73738d
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 40 deletions.
21 changes: 6 additions & 15 deletions .github/workflows/kompose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,19 @@ on:
- .github/workflows/kompose.yml
jobs:
kompose:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
env:
PY_COLORS: 1
ANSIBLE_FORCE_COLOR: 1
strategy:
fail-fast: true
matrix:
molecule_distro:
- distro: centos:7
command: /usr/sbin/init
- distro: centos:8
command: /usr/sbin/init
# - fedora:29
# - fedora:28
- distro: ubuntu:16.04
command: /sbin/init
- distro: ubuntu:18.04
command: /lib/systemd/systemd
- distro: ubuntu:20.04
command: /lib/systemd/systemd
- distro: debian:9
command: /lib/systemd/systemd
- {distro: centos-8, command: /usr/sbin/init}
- {distro: ubuntu-18.04, command: /lib/systemd/systemd}
- {distro: ubuntu-20.04, command: /lib/systemd/systemd}
- {distro: ubuntu-22.04, command: /lib/systemd/systemd}
- {distro: debian-10, command: /lib/systemd/systemd}
collection_role:
- kompose
steps:
Expand Down
35 changes: 15 additions & 20 deletions .github/workflows/kubectl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
- .github/workflows/kubectl.yml
jobs:
kubectl:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
env:
PY_COLORS: 1
ANSIBLE_FORCE_COLOR: 1
Expand All @@ -23,18 +23,11 @@ jobs:
molecule_distro:
- distro: centos:7
command: /usr/sbin/init
- distro: centos:8
command: /usr/sbin/init
# - fedora:29
# - fedora:28
- distro: ubuntu:16.04
command: /sbin/init
- distro: ubuntu:18.04
command: /lib/systemd/systemd
- distro: ubuntu:20.04
command: /lib/systemd/systemd
- distro: debian:9
command: /lib/systemd/systemd
- {distro: centos-8, command: /usr/sbin/init}
- {distro: ubuntu-18.04, command: /lib/systemd/systemd}
- {distro: ubuntu-20.04, command: /lib/systemd/systemd}
- {distro: ubuntu-22.04, command: /lib/systemd/systemd}
- {distro: debian-10, command: /lib/systemd/systemd}
collection_role:
- kubectl
steps:
Expand All @@ -43,21 +36,23 @@ jobs:
with:
path: ansible_collections/ericsysmin/kubernetes

- name: Set up Python 3.8
uses: actions/setup-python@v1
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.12

- name: Install dependencies
run: |
sudo apt install docker
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
python -m pip install --upgrade pip
pip install molecule yamllint ansible-lint docker
pip install ansible molecule yamllint ansible-lint molecule-plugins[docker]
- name: Run role test
- name: Run role tests
run: >-
molecule --version &&
ansible --version &&
MOLECULE_COMMAND=${{ matrix.molecule_distro.command }}
MOLECULE_DISTRO=${{ matrix.molecule_distro.distro }}
molecule --debug test -s ${{ matrix.collection_role }}
molecule --debug test -s ${{ matrix.collection_role }}
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ on:
- created
jobs:
release:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
env:
ANSIBLE_GALAXY_TOKEN: ${{ secrets.ANSIBLE_GALAXY_TOKEN }}
ANSIBLE_FORCE_COLOR: 1
steps:
- name: Check out code
uses: actions/checkout@v1

- name: Set up Python 3.8
uses: actions/setup-python@v1
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.12

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install molecule yamllint ansible-lint docker
pip install ansible
- name: Run role test
run: >-
Expand Down

0 comments on commit f73738d

Please sign in to comment.