2021-12-14 08:54:49 +00:00
|
|
|
---
|
|
|
|
name: CI
|
|
|
|
"on":
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
ci:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
python_version: ["3.9"]
|
|
|
|
steps:
|
|
|
|
- name: Check out code
|
|
|
|
uses: actions/checkout@v2
|
2022-01-13 19:16:44 +00:00
|
|
|
with:
|
|
|
|
path: ansible_collections/middleware_automation/keycloak
|
2021-12-14 08:54:49 +00:00
|
|
|
|
|
|
|
- name: Set up Python ${{ matrix.python_version }}
|
|
|
|
uses: actions/setup-python@v1
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python_version }}
|
|
|
|
|
|
|
|
- name: Install yamllint, ansible and molecule
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
pip install yamllint 'molecule[docker]~=3.5.2' ansible-core flake8 ansible-lint voluptuous
|
2022-02-08 15:28:17 +00:00
|
|
|
pip install -r ansible_collections/middleware_automation/keycloak/requirements.txt
|
2021-12-14 08:54:49 +00:00
|
|
|
|
2022-02-15 12:05:33 +00:00
|
|
|
- name: Install ansible-lint custom rules
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
repository: ansible-middleware/ansible-lint-custom-rules
|
2022-02-15 12:14:36 +00:00
|
|
|
path: ansible_collections/ansible-lint-custom-rules/
|
2022-02-15 12:05:33 +00:00
|
|
|
|
2022-01-13 19:08:41 +00:00
|
|
|
- name: Create default collection path
|
2021-12-14 08:54:49 +00:00
|
|
|
run: |
|
2022-01-13 19:08:41 +00:00
|
|
|
mkdir -p /home/runner/.ansible/collections/ansible_collections
|
2021-12-14 08:54:49 +00:00
|
|
|
|
|
|
|
- name: Run sanity tests
|
2022-03-25 17:22:55 +00:00
|
|
|
run: ansible-test sanity --docker -v --color --python ${{ matrix.python_version }} --exclude changelogs/fragments/.gitignore
|
2022-01-13 19:16:44 +00:00
|
|
|
working-directory: ./ansible_collections/middleware_automation/keycloak
|
2021-12-14 08:54:49 +00:00
|
|
|
|
|
|
|
- name: Run molecule test
|
2021-12-14 15:01:41 +00:00
|
|
|
run: molecule test --all
|
2022-01-13 19:16:44 +00:00
|
|
|
working-directory: ./ansible_collections/middleware_automation/keycloak
|
2021-12-14 10:59:03 +00:00
|
|
|
env:
|
|
|
|
PY_COLORS: '1'
|
|
|
|
ANSIBLE_FORCE_COLOR: '1'
|