Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #260 from lemberg/chore/molecule-tests
Browse files Browse the repository at this point in the history
Make CI green again
  • Loading branch information
T2L authored Jul 7, 2022
2 parents 389be55 + 178dc5c commit 9a189de
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 21 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/Integrate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,7 @@ jobs:

needs: php

runs-on: macos-latest

# Workaround 'XXX may have been in progress in another thread when fork()
# was called.'
# See https://github.com/ansible/ansible/issues/32499
env:
OBJC_DISABLE_INITIALIZE_FORK_SAFETY: 'YES'
runs-on: ubuntu-latest

strategy:
matrix:
Expand All @@ -92,10 +86,10 @@ jobs:
php-version:
- '7.4'
python-version:
- '3.8'
- '3.9'
molecule-platform:
- bionic64
- focal64
- 20.04
- 22.04

steps:
- name: Checkout
Expand Down Expand Up @@ -152,13 +146,16 @@ jobs:
run: molecule test
env:
MOLECULE_PLATFORM: ${{ matrix.molecule-platform }}
# Force color output.
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'

vagrant:
name: Vagrant / ubuntu/${{ matrix.vagrant-box }}

needs: molecule

runs-on: macos-10.15
runs-on: macos-12

strategy:
matrix:
Expand All @@ -167,8 +164,8 @@ jobs:
php-version:
- '7.4'
vagrant-box:
- bionic64
- focal64
- jammy64

# Workaround 'XXX may have been in progress in another thread when fork()
# was called.'
Expand Down Expand Up @@ -205,6 +202,9 @@ jobs:
- name: Set Vagrant box to use
run: sed -i '' 's/focal64/${{ matrix.vagrant-box }}/g' default.vm-settings.yml

- name: Install Vagrant
run: brew install vagrant

# See https://github.com/hashicorp/vagrant/pull/12581
- name: Fix missing VagrantPlugins::HostDarwin::Cap::Version on Big Sur
run: |
Expand Down
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Else draft environment is not within the synced folder. In this case create
# another NFS synced folder containing the required files.
else
config.vm.synced_folder VM_BASE_PATH, "/vagrant", id: "vagrant", type: "nfs", create: true
config.vm.synced_folder VM_BASE_PATH, "/vagrant", id: "vagrant", type: "nfs", create: true, nfs_udp: false
ansible_provisioning_path = "/vagrant/provisioning"
end

Expand Down
7 changes: 5 additions & 2 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
vagrant: "{{ vagrant | combine(overrides, recursive=true) }}"
draft_features:
- mailhog
- swapfile
- git_config
- apache2
- mysql
Expand All @@ -26,9 +25,13 @@
hostname: molecule
ip_address: 10.10.10.10


- name: Update apt cache
ansible.builtin.apt:
update_cache: true

roles:
- ../../provisioning/roles/draft
- oefenweb.swapfile
- ../../provisioning/roles/git_config
- ../../provisioning/roles/apache2
- geerlingguy.mysql
Expand Down
9 changes: 5 additions & 4 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@ dependency:
roles-path: ~/.ansible/roles
role-file: provisioning/requirements.yml
driver:
name: vagrant
name: docker
lint: |
set -e
yamllint .
ansible-lint .
platforms:
- name: draft
box: ubuntu/${MOLECULE_PLATFORM}
memory: 1024
cpus: 2
image: ubuntu:${MOLECULE_PLATFORM}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
privileged: true
provisioner:
name: ansible
config_options:
Expand Down
3 changes: 1 addition & 2 deletions molecule/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ ansible==4.*
ansible-lint
yamllint
molecule
python-vagrant
molecule-vagrant
molecule-docker
2 changes: 2 additions & 0 deletions provisioning/src/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ def merge_default_settings
self.get_git_credentials
# Use *.test domain (RFC 2606).
self.set("vagrant.hostname", self.get("vagrant.hostname") + '.test');
# Disable UDP protocol for NFS, see https://discourse.ubuntu.com/t/jammy-jellyfish-release-notes/24668
self.set("vagrant.synced_folder_options.nfs_udp", false);
# Symbolize synced folder options.
self.symbolize_synced_folder_options
# Set correct Ansible version to install when wildcard version constraint
Expand Down

0 comments on commit 9a189de

Please sign in to comment.