CI #166
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: CI | |
'on': | |
pull_request: | |
push: | |
branches: | |
- master | |
- develop | |
schedule: | |
- cron: "0 7 * * 0" | |
defaults: | |
run: | |
working-directory: 'bulch.rsync_server' | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the codebase. | |
uses: actions/[email protected] | |
with: | |
path: 'bulch.rsync_server' | |
- name: Set up Python 3. | |
uses: actions/[email protected] | |
with: | |
python-version: '3.x' | |
- name: Install test dependencies. | |
run: pip3 install yamllint ansible-lint | |
- name: Lint code yamllint. | |
run: | | |
yamllint . | |
- name: Lint code ansible-lint. | |
run: | | |
ansible-lint . | |
molecule: | |
name: Molecule | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
distro: | |
- ubuntu2404 | |
- ubuntu2204 | |
- ubuntu2004 | |
- ubuntu1804 | |
# - ubuntu1604 # TODO: fatal: [instance]: FAILED! => | |
# { | |
# "ansible_facts": {}, | |
# "changed": false, | |
# "failed_modules": { | |
# "ansible.legacy.setup": { | |
# "ansible_facts": { | |
# "discovered_interpreter_python": "/usr/bin/python3" | |
# }, | |
# "failed": true, | |
# "msg": "ansible-core requires a minimum of Python2 version 2.7 or Python3 version 3.6. Current version: 3.5.2 (default, Jan 26 2021, 13:30:48) [GCC 5.4.0 20160609]" | |
# } | |
# }, | |
# "msg": "The following modules failed to execute: ansible.legacy.setup\n" | |
# } | |
# - ubuntu1404 # TODO: ansible-core requires a minimum of Python2 version 2.7 or Python3 version 3.6. Current version: 3.4.3 (default, Nov 28 2017, 16:41:13) [GCC 4.8.4] | |
# - ubuntu1204 # DEPRECATED https://hub.docker.com/r/geerlingguy/docker-ubuntu1204-ansible | |
steps: | |
- name: Check out the codebase. | |
uses: actions/[email protected] | |
with: | |
path: 'bulch.rsync_server' | |
- name: Set up Python 3. | |
uses: actions/[email protected] | |
with: | |
python-version: '3.x' | |
- name: Install test dependencies. | |
run: pip3 install -r requirements.txt | |
- name: Createt vault | |
run: echo "qwerty" > .vault_password | |
- name: Run Molecule tests. | |
run: molecule test --all | |
env: | |
PY_COLORS: '1' | |
ANSIBLE_FORCE_COLOR: '1' | |
MOLECULE_DISTRO: ${{ matrix.distro }} |