Bertrand Lanson
d4c4bb1cf1
Some checks failed
development / Check commit compliance (push) Successful in 5s
test / end_to_end_vault (debian11, vault_default) (pull_request) Failing after 7s
test / end_to_end_vault (debian12, vault_default) (pull_request) Failing after 2s
test / end_to_end_vault (debian11, vault_with_raft_enabled) (pull_request) Failing after 7s
test / end_to_end_vault (debian12, vault_with_raft_enabled) (pull_request) Failing after 1s
test / end_to_end_vault (ubuntu2004, vault_default) (pull_request) Failing after 2s
test / end_to_end_vault (ubuntu2004, vault_with_raft_enabled) (pull_request) Failing after 1s
test / end_to_end_vault (ubuntu2204, vault_default) (pull_request) Failing after 2s
test / end_to_end_vault (ubuntu2204, vault_with_raft_enabled) (pull_request) Failing after 1s
test / end_to_end_vault (ubuntu2404, vault_default) (pull_request) Failing after 2s
test / end_to_end_vault (ubuntu2404, vault_with_raft_enabled) (pull_request) Failing after 1s
pull-requests-open / Check commit compliance (pull_request) Successful in 11s
62 lines
1.9 KiB
YAML
62 lines
1.9 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"
|
|
|
|
jobs:
|
|
retrieve-credentials:
|
|
name: Retrieve Credentials
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
registry-username: ${{ steps.import-secrets.outputs.GITEA_ACTIONS_USERNAME }}
|
|
registry-token: ${{ steps.import-secrets.outputs.GITEA_ACTIONS_TOKEN }}
|
|
steps:
|
|
- name: Get secrets from vault
|
|
id: import-secrets
|
|
uses: hashicorp/vault-action@v3
|
|
with:
|
|
url: "https://vault.ednz.fr"
|
|
method: approle
|
|
roleId: ${{ secrets.VAULT_APPROLE_ID }}
|
|
secretId: ${{ secrets.VAULT_APPROLE_SECRET_ID }}
|
|
secrets: |
|
|
kv/data/applications/gitea/users/actions username | GITEA_ACTIONS_USERNAME ;
|
|
kv/data/applications/gitea/users/actions token_write | GITEA_ACTIONS_TOKEN ;
|
|
|
|
molecule-test:
|
|
name: Molecule tests
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: git.ednz.fr/container-factory/ansible-runner:act-latest
|
|
credentials:
|
|
username: ${{needs.retrieve-credentials.outputs.registry-username}}
|
|
password: ${{needs.retrieve-credentials.outputs.registry-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 }}/roles/${{ inputs.role }}
|
|
env:
|
|
MOLECULE_TEST_OS: ${{ inputs.test_os }}
|