aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/molecule.yml
blob: 85362b6c915317d3e89abe435fda3a9a2b2e46ea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
name: Molecule

"on":
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

jobs:
  molecule:
    name: Run Molecule Scenario
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        scenario:
          - default
          - delete
    env:
      PY_COLORS: "1"
      ANSIBLE_FORCE_COLOR: "1"
      ANSIBLE_ALLOW_BROKEN_CONDITIONALS: "True"
      ANSIBLE_INJECT_INVOCATION: "true"
    steps:
      - name: Check out the codebase
        uses: actions/checkout@v4

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: "3.11"

      - name: Install test dependencies
        run: |
          python -m pip install --upgrade pip
          python -m pip install ansible-core docker molecule molecule-plugins[docker] pytest pytest-testinfra requests

      - name: Install Ansible collections
        run: ansible-galaxy collection install community.crypto

      - name: Run Molecule scenario
        run: molecule test -s "${{ matrix.scenario }}"