diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index 8fe2493..74de5ab 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -22,17 +22,24 @@ jobs: name: Test needs: - list-scenarios - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 strategy: # Keep running so we can see if other tests pass fail-fast: false matrix: scenario: ${{fromJson(needs.list-scenarios.outputs.matrix)}} steps: - - uses: actions/checkout@v2 - - uses: ome/action-ome-ansible-molecule@main + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 with: - scenario: ${{ matrix.scenario }} + python-version: '3.8' + - name: Install Ansible & Molecule + run: | + pip install "ansible<8" "ansible-lint<6.13" flake8 + pip install "molecule<5" "ansible-compat<4" + pip install molecule-plugins[docker] pytest-testinfra + - name: Run molecule + run: molecule test -s "${{ matrix.scenario }}" # notifications: # webhooks: https://galaxy.ansible.com/api/v1/notifications/ diff --git a/molecule/centos7/molecule.yml b/molecule/centos7/molecule.yml index 2bd1712..a24bf90 100644 --- a/molecule/centos7/molecule.yml +++ b/molecule/centos7/molecule.yml @@ -5,8 +5,10 @@ dependency: role-file: requirements.yml driver: name: docker -lint: - name: yamllint +lint: | + yamllint . + ansible-lint + flake8 platforms: - name: omero-all image: centos/systemd @@ -23,5 +25,3 @@ scenario: name: centos7 verifier: name: testinfra - lint: - name: flake8 diff --git a/molecule/ubuntu1804/Dockerfile.j2 b/molecule/ubuntu1804/Dockerfile.j2 deleted file mode 120000 index 0e9184b..0000000 --- a/molecule/ubuntu1804/Dockerfile.j2 +++ /dev/null @@ -1 +0,0 @@ -../resources/Dockerfile.j2 \ No newline at end of file diff --git a/molecule/ubuntu1804/molecule.yml b/molecule/ubuntu1804/molecule.yml deleted file mode 100644 index 16b2bbd..0000000 --- a/molecule/ubuntu1804/molecule.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -dependency: - name: galaxy - options: - role-file: requirements.yml -driver: - name: docker -lint: - name: yamllint -platforms: - - name: omero-all - image: jrei/systemd-ubuntu:18.04 - command: /sbin/init - privileged: true - tmpfs: - - /sys/fs/cgroup -provisioner: - name: ansible - lint: - name: ansible-lint - playbooks: - converge: ../../playbook.yml -scenario: - name: ubuntu1804 -verifier: - name: testinfra - lint: - name: flake8 diff --git a/molecule/ubuntu1804/tests b/molecule/ubuntu1804/tests deleted file mode 120000 index 4e7cdbc..0000000 --- a/molecule/ubuntu1804/tests +++ /dev/null @@ -1 +0,0 @@ -../resources/tests \ No newline at end of file diff --git a/molecule/ubuntu2004/molecule.yml b/molecule/ubuntu2004/molecule.yml index e548825..b468220 100644 --- a/molecule/ubuntu2004/molecule.yml +++ b/molecule/ubuntu2004/molecule.yml @@ -5,8 +5,10 @@ dependency: role-file: requirements.yml driver: name: docker -lint: - name: yamllint +lint: | + yamllint . + ansible-lint + flake8 platforms: - name: omero-all image: jrei/systemd-ubuntu:20.04 @@ -24,5 +26,3 @@ scenario: name: ubuntu2004 verifier: name: testinfra - lint: - name: flake8