2024-09-15 20:42:29 +00:00
|
|
|
---
|
|
|
|
name: End-to-end tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_call:
|
|
|
|
inputs:
|
|
|
|
role:
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
description: "Which role should be tested"
|
2024-09-15 20:47:29 +00:00
|
|
|
scenario:
|
2024-09-15 20:42:29 +00:00
|
|
|
required: true
|
|
|
|
type: string
|
2024-09-15 20:47:29 +00:00
|
|
|
description: "Which scenarios should be run"
|
2024-09-15 20:42:29 +00:00
|
|
|
test_os:
|
|
|
|
required: true
|
|
|
|
type: string
|
2024-09-15 20:47:29 +00:00
|
|
|
description: "On which OS to run the tests"
|
2024-09-15 20:51:47 +00:00
|
|
|
secrets:
|
2024-09-15 21:00:26 +00:00
|
|
|
GITEA_ACTIONS_USERNAME:
|
2024-09-15 20:51:47 +00:00
|
|
|
required: true
|
2024-09-15 21:00:26 +00:00
|
|
|
GITEA_ACTIONS_TOKEN:
|
2024-09-15 20:51:47 +00:00
|
|
|
required: true
|
2024-09-15 20:42:29 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
molecule-test:
|
|
|
|
name: Molecule tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
|
|
image: git.ednz.fr/container-factory/ansible-runner:act-latest
|
|
|
|
credentials:
|
2024-09-15 21:00:26 +00:00
|
|
|
username: ${{ secrets.GITEA_ACTIONS_USERNAME }}
|
|
|
|
password: ${{ secrets.GITEA_ACTIONS_TOKEN }}
|
2024-09-15 20:42:29 +00:00
|
|
|
env:
|
|
|
|
ANSIBLE_HOST_KEY_CHECKING: "false"
|
|
|
|
ANSIBLE_FORCE_COLOR: "true"
|
|
|
|
ANSIBLE_PYTHON_INTERPRETER: /usr/bin/python3
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: "Molecule test"
|
2024-09-15 20:47:29 +00:00
|
|
|
run: molecule test -s ${{ inputs.scenario }}
|
2024-09-15 20:42:29 +00:00
|
|
|
shell: bash
|
2024-09-15 21:04:14 +00:00
|
|
|
working-directory: ${{ gitea.workspace }}
|
2024-09-15 20:42:29 +00:00
|
|
|
env:
|
2024-09-15 20:47:29 +00:00
|
|
|
MOLECULE_TEST_OS: ${{ inputs.test_os }}
|