{"id":16780581,"url":"https://github.com/monolithprojects/action-molecule","last_synced_at":"2025-06-24T16:32:42.150Z","repository":{"id":65070689,"uuid":"264308958","full_name":"MonolithProjects/action-molecule","owner":"MonolithProjects","description":"GitHub Action for Ansible roles testing using Molecule","archived":false,"fork":false,"pushed_at":"2022-12-23T22:59:48.000Z","size":26,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-01T18:08:24.086Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MonolithProjects.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-15T22:09:41.000Z","updated_at":"2023-02-20T20:55:40.000Z","dependencies_parsed_at":"2023-01-05T04:49:13.765Z","dependency_job_id":null,"html_url":"https://github.com/MonolithProjects/action-molecule","commit_stats":{"total_commits":52,"total_committers":1,"mean_commits":52.0,"dds":0.0,"last_synced_commit":"b39579fd95ec6956ac3d3fde62600a2b80957591"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MonolithProjects%2Faction-molecule","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MonolithProjects%2Faction-molecule/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MonolithProjects%2Faction-molecule/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MonolithProjects%2Faction-molecule/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MonolithProjects","download_url":"https://codeload.github.com/MonolithProjects/action-molecule/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243925990,"owners_count":20369914,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T07:35:27.916Z","updated_at":"2025-03-16T20:21:21.877Z","avatar_url":"https://github.com/MonolithProjects.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Molecule GitHub Action\n\nGitHub Action for Molecule 3.5.2 (docker driver) to test your Ansible Roles including the Ansible-playbook arguments.  \nThis GitHub Action is small, multi stage built, Alpine Linux 3.13 based Docker image.  \n\n## Inputs\n\n```yaml\n  molecule_command:\n    description: |\n      Molecule commands:\n        check        Use the provisioner to perform a Dry-Run.\n        cleanup      Use the provisioner to cleanup changes.\n        converge     Use the provisioner to configure instances.\n        create       Use the provisioner to start the instances.\n        dependency   Manage the role's dependencies.\n        destroy      Use the provisioner to destroy the instances.\n        drivers      List drivers.\n        idempotence  Use the provisioner to test the idempotence.\n        init         Initialize a new role or scenario.\n        lint         Lint the role.\n        list         List status of instances.\n        login        Log in to one instance.\n        matrix       List matrix of steps used to test instances.\n        prepare      Use the provisioner to prepare the instances.\n        reset        Reset molecule temporary folders.\n        side-effect  Use the provisioner to perform side-effects to the instances.\n        syntax       Use the provisioner to syntax check the role.\n        test         Test cicle.\n        verify       Run automated tests against instances.\n    required: true\n    default: 'test'\n  converge_extra_args:\n    description: |\n      Run molecule converge with ansible-playbook arguments ( Same like: molecule converge -- --tags foo,bar --extra_vars \"my_var=true\").\n    required: false\n  scenario:\n    description: |\n      Run specific Molecule Scenario\n    required: false\n```\n\n## Usage\n\nTo use the action simply create a `yaml` file in `.github/workflows/` directory. See the examples below. \n\n### Basic example\n\nIn this case the GitHub Action will run `molecule test`:\n\n```yaml\non: push\n\njobs:\n  molecule:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n        with:\n          path: \"${{ github.repository }}\"\n      - name: Molecule\n        uses: monolithprojects/action-molecule@v1.4.1\n```\n\n### Ansible-playbook arguments\n\nIn this case the GitHub Action will run `molecule converge -s special_scenario -- --tags foo,bar --extra_vars \"my_var=true\"`:\n\n```yaml\non: push\n\njobs:\n  molecule:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n        with:\n          path: \"${{ github.repository }}\"\n      - name: Molecule\n        uses: monolithprojects/action-molecule@v1.4.1\n        with:\n          molecule_command: converge\n          scenario: special_scenario\n          converge_extra_args: --tags foo,bar --extra_vars \"my_var=true\"\n```\n\n### Matrix for used image and tag\n\n```yaml\non: push\n\njobs:\n  molecule:\n    runs-on: ubuntu-latest\n    strategy:\n      fail-fast: false\n      matrix:\n        config:\n          - os: \"centos8\"\n            tag: \"latest\"\n          - os: \"ubuntu20\"\n            tag: \"latest\"\n    steps:\n      - uses: actions/checkout@v2\n        with:\n          path: \"${{ github.repository }}\"\n      - name: Molecule\n        uses: MonolithProjects/action-molecule@v1.4.1\n        with:\n          os: ${{ matrix.config.os }}\n          tag: ${{ matrix.config.tag }}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonolithprojects%2Faction-molecule","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonolithprojects%2Faction-molecule","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonolithprojects%2Faction-molecule/lists"}