Updates for newer versions of ansible. #33
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: | |
- main | |
defaults: | |
run: | |
working-directory: 'n4dkn-rpi' | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Check out the codebase. | |
uses: actions/checkout@v2 | |
with: | |
path: 'n4dkn-rpi' | |
- name: Install test dependencies. | |
run: python -m pip install --user ansible ansible-lint | |
- name: Lint yamllint. | |
run: yamllint -f github -v --no-warnings . | |
- name: Lint ansible. | |
run: ansible-lint | |
# https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners#supported-software | |
molecule: | |
name: Molecule | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
distro: | |
- debian10 | |
steps: | |
- name: Check out the codebase. | |
uses: actions/checkout@v2 | |
with: | |
path: 'n4dkn-rpi' | |
- name: Set up Python 3. | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install test dependencies. | |
run: pip3 install ansible molecule[docker] docker testinfra | |
- name: Run Molecule tests. | |
run: molecule test | |
env: | |
PY_COLORS: '1' | |
ANSIBLE_FORCE_COLOR: '1' | |
MOLECULE_DISTRO: ${{ matrix.distro }} |