Skip to content

Commit

Permalink
Add check for all molecule test were successful
Browse files Browse the repository at this point in the history
Removed ansible pip package as it already exist on the GH runners
  • Loading branch information
Benjamin Cook committed May 13, 2024
1 parent 98e8c7e commit c448b1d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 20 deletions.
28 changes: 16 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,14 @@ jobs:
with:
path: 'bcook254.adguardhome'

- name: Set up Python 3.
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install test dependencies.
run: python -m pip install yamllint

- name: Lint code.
run: yamllint .

molecule:
name: Molecule Test
name: Molecule Test (${{ matrix.platform.name }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down Expand Up @@ -67,13 +62,8 @@ jobs:
with:
path: 'bcook254.adguardhome'

- name: Set up Python 3.
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install test dependencies.
run: python -m pip install ansible molecule molecule-plugins[docker] docker
run: python -m pip install molecule molecule-plugins[podman]

- name: Run Molecule tests.
run: molecule test --driver-name docker
Expand All @@ -82,3 +72,17 @@ jobs:
PLATFORM_IMAGE: ${{ matrix.platform.image }}
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'

check:
name: All Molecule Tests Successful
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
needs: [molecule]
steps:
- name: Exit on failure
if: ${{ needs.molecule.result == 'failure' }}
shell: bash
run: exit 1
- name: Exit
shell: bash
run: exit 0
8 changes: 0 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@ jobs:
with:
path: 'bcook254.adguardhome'

- name: Set up Python 3.
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install Ansible.
run: python3 -m pip install ansible-core

- name: Trigger a new import on Galaxy.
run: >-
ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }}
Expand Down

0 comments on commit c448b1d

Please sign in to comment.