46 lines
1.3 KiB
YAML
46 lines
1.3 KiB
YAML
---
|
|
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
|
|
with:
|
|
path: ansible_collections/middleware_automation/keycloak
|
|
|
|
- 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
|
|
pip install -r requirements.txt
|
|
|
|
- name: Create default collection path
|
|
run: |
|
|
mkdir -p /home/runner/.ansible/collections/ansible_collections
|
|
|
|
- name: Run sanity tests
|
|
run: ansible-test sanity --docker -v --color --python ${{ matrix.python_version }}
|
|
working-directory: ./ansible_collections/middleware_automation/keycloak
|
|
|
|
- name: Run molecule test
|
|
run: molecule test --all
|
|
working-directory: ./ansible_collections/middleware_automation/keycloak
|
|
env:
|
|
PY_COLORS: '1'
|
|
ANSIBLE_FORCE_COLOR: '1'
|