Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge molecule default and ci scenarios #7

Merged
merged 4 commits into from
May 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 17 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ name: ci
- 'LICENSE'
- 'README.md'

defaults:
run:
working-directory: 'bcook254.vaultwarden'

jobs:

lint:
Expand All @@ -23,13 +19,6 @@ jobs:
steps:
- name: Check out the codebase.
uses: actions/checkout@v4
with:
path: 'bcook254.vaultwarden'

- 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
Expand All @@ -38,7 +27,7 @@ jobs:
run: yamllint .

molecule:
name: Molecule Test
name: Molecule Test (${{ matrix.platform.name }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -61,23 +50,30 @@ jobs:
steps:
- name: Check out the codebase.
uses: actions/checkout@v4
with:
path: 'bcook254.vaultwarden'

- 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[docker]

- name: Run Molecule tests.
run: molecule test --driver-name docker --scenario-name ci
run: molecule test --driver-name docker
env:
PLATFORM_NAME: ${{ matrix.platform.name }}
PLATFORM_IMAGE: ${{ matrix.platform.image }}
VAULTWARDEN_VERSION: '1.30.5'
VAULTWARDEN_URL: ${{ secrets.VAULTWARDEN_URL }}
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'

check:
name: Molecule Tests
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
17 changes: 0 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,12 @@ name: Release
tags:
- '*'

defaults:
run:
working-directory: 'bcook254.vaultwarden'

jobs:

release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Check out the codebase.
uses: actions/checkout@v3
with:
path: 'bcook254.vaultwarden'

- 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
10 changes: 0 additions & 10 deletions molecule/ci/converge.yml

This file was deleted.

43 changes: 0 additions & 43 deletions molecule/ci/molecule.yml

This file was deleted.

26 changes: 0 additions & 26 deletions molecule/ci/prepare.yml

This file was deleted.

2 changes: 0 additions & 2 deletions molecule/ci/requirements.yml

This file was deleted.

30 changes: 0 additions & 30 deletions molecule/ci/verify.yml

This file was deleted.

7 changes: 3 additions & 4 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ dependency:
driver:
name: podman
platforms:
- name: ${MOLECULE_DISTRO:-ubuntu2404}
image: docker.io/geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu2404}-ansible:latest
- name: ${PLATFORM_NAME:-ubuntu2404}
image: ${PLATFORM_IMAGE:-"docker.io/geerlingguy/docker-ubuntu2404-ansible:latest"}
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /sys/fs/cgroup:/sys/fs/cgroup:rw
privileged: true
cgroupns_mode: host
pre_build_image: true
Expand Down Expand Up @@ -40,5 +40,4 @@ verifier:
name: ansible
lint: |
set -e
yamllint .
ansible-lint .