Skip to content

Merge pull request #8 from RanabirChakraborty/validated_content_fix-1 #29

Merge pull request #8 from RanabirChakraborty/validated_content_fix-1

Merge pull request #8 from RanabirChakraborty/validated_content_fix-1 #29

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@v4
- name: Set up Python3.
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install yamllint
run: |
python -m pip install --upgrade pip
pip install yamllint 'molecule>=24.2.0' 'molecule-plugins[docker]>=23.5.3' 'ansible-core<2.16' ansible-lint
python -m pip install 'requests<2.32'
- 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 --version
molecule test
env:
PROD_JBOSSNETWORK_API_CLIENTID: '${{ secrets.PROD_JBOSSNETWORK_API_CLIENTID }}'
PROD_JBOSSNETWORK_API_SECRET: '${{ secrets.PROD_JBOSSNETWORK_API_SECRET }}'