Skip to content

Merge pull request #4 from ansible-middleware/molecule_postgres #15

Merge pull request #4 from ansible-middleware/molecule_postgres

Merge pull request #4 from ansible-middleware/molecule_postgres #15

Workflow file for this run

---
name: CI
on:
pull_request:
push:
branches:
- main
env:
COLORTERM: 'yes'
TERM: 'xterm-256color'
PYTEST_ADDOPTS: '--color=yes'
jobs:
test:
name: CI test
runs-on: ubuntu-latest
steps:
- name: Checkout the codebase.
uses: actions/checkout@v2
- name: Set up Python3.
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install yamllint
run: |
python -m pip install --upgrade pip
pip install yamllint 'molecule>=6.0.3' 'molecule-plugins[docker]>=23.5.3' ansible-core ansible-lint
- name: Prepare ansible.cfg and reqs
run: |
echo "[galaxy]
server_list = automation_hub, release_galaxy
[galaxy_server.automation_hub]
url=https://console.redhat.com/api/automation-hub/content/published/
auth_url=https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token
token = ${{ secrets.ANSIBLE_GALAXY_TOKEN }}
[galaxy_server.release_galaxy]
url=https://galaxy.ansible.com/"> ansible.cfg
ansible-galaxy collection install -r molecule/requirements.yml
- name: Linter
run: |
ansible-lint --version
ansible-lint --offline
- name: Run molecule test
run: |
molecule test
env:
PROD_JBOSSNETWORK_API_CLIENTID: '${{ secrets.PROD_JBOSSNETWORK_API_CLIENTID }}'
PROD_JBOSSNETWORK_API_SECRET: '${{ secrets.PROD_JBOSSNETWORK_API_SECRET }}'