Skip to content

Commit

Permalink
Update action test platform targets (#16)
Browse files Browse the repository at this point in the history
* Update action test platform targets

* Fix test makefile target definition

* Fix broken docker test image references

* Fix broken package names
  • Loading branch information
teddyphreak authored Jan 21, 2025
1 parent 450de43 commit c591bb5
Show file tree
Hide file tree
Showing 13 changed files with 61 additions and 38 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,28 @@
name: lint

on:

pull_request:
branches:
- master

defaults:

run:
working-directory: 'nephelaiio.devtools'
working-directory: "nephelaiio.devtools"

jobs:

lint:

name: lint
runs-on: ubuntu-latest
steps:
- name: Check out the codebase
uses: actions/checkout@v4
with:
path: 'nephelaiio.devtools'
path: "nephelaiio.devtools"

- name: Set up python 3
uses: actions/setup-python@v5
with:
python-version: '3.x'
python-version: "3.x"

- name: Update ubuntu repositories
run: sudo apt-get update
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,45 @@
name: molecule

on:

pull_request:
branches:
- master
schedule:
- cron: "0 5 * * 5"

defaults:

run:
working-directory: 'nephelaiio.devtools'
working-directory: "nephelaiio.devtools"

jobs:

molecule:

name: molecule
runs-on: ubuntu-latest
strategy:
matrix:
scenario:
- name: default
image:
- name: ubuntu2404
command: /lib/systemd/systemd
- name: ubuntu2204
command: /lib/systemd/systemd
- name: ubuntu2004
command: /lib/systemd/systemd
- name: debian12
command: /lib/systemd/systemd
- name: debian11
command: /lib/systemd/systemd
steps:
- name: Check out the codebase
uses: actions/checkout@v4
with:
path: 'nephelaiio.devtools'
path: "nephelaiio.devtools"

- name: Set up python 3
uses: actions/setup-python@v5
with:
python-version: '3.x'
python-version: "3.x"

- name: Update ubuntu repositories
run: sudo apt-get update
Expand All @@ -57,8 +57,8 @@ jobs:
- name: Run molecule tests.
run: make test
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
PY_COLORS: "1"
ANSIBLE_FORCE_COLOR: "1"
MOLECULE_DOCKER_IMAGE: ${{ matrix.image.name }}
MOLECULE_DOCKER_COMMAND: ${{ matrix.image.command }}
MOLECULE_SCENARIO: ${{ matrix.scenario.name }}
9 changes: 3 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,23 @@ on:
- "*"

defaults:

run:
working-directory: 'nephelaiio.devtools'
working-directory: "nephelaiio.devtools"

jobs:

release:

name: Release
runs-on: ubuntu-latest
steps:
- name: Check out the codebase.
uses: actions/checkout@v4
with:
path: 'nephelaiio.devtools'
path: "nephelaiio.devtools"

- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: '3.x'
python-version: "3.x"

- name: Update ubuntu repositories
run: sudo apt-get update
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ REQUIREMENTS = requirements.yml

all: install version lint test

test: lint
poetry run molecule test -s ${MOLECULE_SCENARIO}

install:
@type poetry >/dev/null || pip3 install poetry
@poetry self add poetry-plugin-export
Expand Down
13 changes: 6 additions & 7 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,21 @@ galaxy_info:
author: nephelaiio
description: An Ansible role to install and configure base development tools
license: MIT
min_ansible_version: '2.2'
min_ansible_version: "2.2"
platforms:
- name: EL
versions:
- 'all'
- "all"
- name: ArchLinux
versions:
- 'all'
- "all"
- name: Ubuntu
versions:
- 'all'
- "all"
- name: Debian
versions:
- 'all'
- "all"
galaxy_tags:
- devtools

dependencies:
- role: nephelaiio.git
dependencies: []
8 changes: 4 additions & 4 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ driver:
name: docker
platforms:
- name: instance
image: "${MOLECULE_DOCKER_IMAGE}"
command: ${MOLECULE_DOCKER_COMMAND:-""}
cgroupns_mode: host
privileged: true
image: geerlingguy/docker-${MOLECULE_DOCKER_IMAGE:-ubuntu2204}-ansible
pre_build_image: true
command: ${MOLECULE_DOCKER_COMMAND:-"/lib/systemd/systemd"}
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
privileged: true
tmpfs:
- /tmp
- /opt
Expand Down
3 changes: 0 additions & 3 deletions requirements.yml

This file was deleted.

1 change: 1 addition & 0 deletions vars/Archlinux.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
devtools_packages_default:
- git
- base-devel
- python
- openssl
Expand Down
9 changes: 9 additions & 0 deletions vars/Debian-11.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
devtools_packages_default:
- git
- build-essential
- m4
- libffi-dev
- python-dev
- libssl-dev
devtools_packages_state: present
3 changes: 2 additions & 1 deletion vars/Debian.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
devtools_packages_default:
- git
- build-essential
- m4
- libffi-dev
- python-dev
- python3-dev
- libssl-dev
devtools_packages_state: present
1 change: 1 addition & 0 deletions vars/RedHat.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
devtools_packages_default:
- git
- autoconf
- automake
- binutils
Expand Down
19 changes: 19 additions & 0 deletions vars/Ubuntu-2004.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
devtools_packages_default:
- git
- autoconf
- automake
- binutils
- bison
- flex
- gcc
- g++
- gettext
- libtool
- make
- m4
- patch
- libffi-dev
- python-dev
- libssl-dev
devtools_packages_state: present
2 changes: 1 addition & 1 deletion vars/Ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ devtools_packages_default:
- m4
- patch
- libffi-dev
- python-dev
- python3-dev
- libssl-dev
devtools_packages_state: present

0 comments on commit c591bb5

Please sign in to comment.