48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
|
---
|
||
|
name: End-to-end tests
|
||
|
|
||
|
on:
|
||
|
workflow_call:
|
||
|
inputs:
|
||
|
role:
|
||
|
required: true
|
||
|
type: string
|
||
|
description: "Which role should be tested"
|
||
|
scenario:
|
||
|
required: true
|
||
|
type: string
|
||
|
description: "Which scenarios should be run"
|
||
|
test_os:
|
||
|
required: true
|
||
|
type: string
|
||
|
description: "On which OS to run the tests"
|
||
|
secrets:
|
||
|
GITEA_ACTIONS_USERNAME:
|
||
|
required: true
|
||
|
GITEA_ACTIONS_TOKEN:
|
||
|
required: true
|
||
|
|
||
|
jobs:
|
||
|
molecule-test:
|
||
|
name: Molecule tests
|
||
|
runs-on: ubuntu-latest
|
||
|
container:
|
||
|
image: git.ednz.fr/container-factory/ansible-runner:act-latest
|
||
|
credentials:
|
||
|
username: ${{ secrets.GITEA_ACTIONS_USERNAME }}
|
||
|
password: ${{ secrets.GITEA_ACTIONS_TOKEN }}
|
||
|
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"
|
||
|
run: molecule test -s ${{ inputs.scenario }}
|
||
|
shell: bash
|
||
|
working-directory: ${{ gitea.workspace }}
|
||
|
env:
|
||
|
MOLECULE_TEST_OS: ${{ inputs.test_os }}
|