CI #95
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 | |
schedule: | |
- cron: "42 1 1 * *" | |
workflow_dispatch: | |
defaults: | |
run: | |
working-directory: 'ganto.acme_tiny' | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the codebase. | |
uses: actions/checkout@v4 | |
with: | |
path: 'ganto.acme_tiny' | |
- name: Set up Python 3. | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install test dependencies. | |
run: pip3 install yamllint ansible-lint | |
- name: Install Ansible collections | |
run: ansible-galaxy install -r molecule/default/collections.yml | |
- name: Add checkout to Ansible role path. | |
run: | | |
mkdir -p ~/.ansible/roles | |
ln -s $(pwd) ~/.ansible/roles/ | |
shell: bash | |
- name: Lint code. | |
run: | | |
yamllint . | |
ansible-lint | |
molecule: | |
name: Molecule | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the codebase. | |
uses: actions/checkout@v4 | |
with: | |
path: 'ganto.acme_tiny' | |
- name: Set up Python 3. | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install test dependencies. | |
run: pip3 install -r molecule/docker/requirements.txt | |
- name: Run Molecule tests. | |
run: molecule test -s docker | |
env: | |
PY_COLORS: '1' | |
ANSIBLE_FORCE_COLOR: '1' |