Skip to content

fixes

fixes #98

---
name: Molecule Testsing
on: # yamllint disable-line rule:truthy
push: null
pull_request:
branches:
- main
- master
permissions: read-all
concurrency:
group: >-
${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
test_bareos:
runs-on: ubuntu-latest
container:
image: ubuntu:latest
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
options: --privileged --cap-add SYS_ADMIN
permissions:
statuses: write
strategy:
fail-fast: false
# matrix:
# role:
# - bareos
# - something
steps:
- name: Install docker
uses: papodaca/install-docker-action@v1
- name: Checkout
uses: actions/checkout@v4
- name: Install python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Poetry install dependecies
run: |
export PATH="/github/home/.local/bin:$PATH"
ls -lha
poetry install --no-root --no-cache --ansi --no-interaction
- name: Show installed versions
run: |
poetry run python --version
poetry --version || true
ESC="$(printf "\033")"
printf "Packages:\n%s\n \n" "$(poetry --ansi run pip list | sed -e "s/ /${ESC}[1;35m /g; s/$/${ESC}[0m/g")"
sudo --version || true
- name: Molecule test
shell: bash
run: |
apt-get install gnupg2 rsync openssh-client -y
cd roles/bareos
poetry --ansi run ansible-galaxy --version
poetry --ansi run molecule test
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'