mirror of
https://github.com/ansible-middleware/keycloak.git
synced 2025-04-09 04:10:27 -07:00
update workflows
This commit is contained in:
parent
5251826477
commit
11621516e3
2 changed files with 12 additions and 186 deletions
141
.github/workflows/ci.yml
vendored
141
.github/workflows/ci.yml
vendored
|
@ -8,138 +8,11 @@ on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 6 * * *'
|
- cron: '0 6 * * *'
|
||||||
|
|
||||||
env:
|
|
||||||
COLORTERM: 'yes'
|
|
||||||
TERM: 'xterm-256color'
|
|
||||||
PYTEST_ADDOPTS: '--color=yes'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
linter:
|
ci:
|
||||||
runs-on: ubuntu-latest
|
uses: ansible-middleware/github-actions/.github/workflows/ci.yml@main
|
||||||
strategy:
|
secrets: inherit
|
||||||
matrix:
|
with:
|
||||||
python_version: ["3.11"]
|
fqcn: 'middleware_automation/keycloak'
|
||||||
ansible_version: ["2.15"]
|
molecule_tests: >-
|
||||||
steps:
|
[ "default", "quarkus", "overridexml" ]
|
||||||
- name: Check out code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
path: ansible_collections/middleware_automation/keycloak
|
|
||||||
|
|
||||||
- name: Set up Python ${{ matrix.python_version }}
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python_version }}
|
|
||||||
cache: 'pip'
|
|
||||||
|
|
||||||
- name: Create default collection path
|
|
||||||
run: |
|
|
||||||
mkdir -p /home/runner/.ansible/
|
|
||||||
ln -s ${{ github.workspace }} /home/runner/.ansible/collections
|
|
||||||
|
|
||||||
- name: Install yamllint, ansible and dependencies
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install yamllint ansible-core==${{ matrix.ansible_version }} ansible-lint
|
|
||||||
if [ -f ansible_collections/middleware_automation/keycloak/requirements.txt ]; then
|
|
||||||
pip install -r ansible_collections/middleware_automation/keycloak/requirements.txt
|
|
||||||
fi
|
|
||||||
if [ -f ansible_collections/middleware_automation/keycloak/requirements.yml ]; then
|
|
||||||
ansible-galaxy collection install -r ansible_collections/middleware_automation/keycloak/requirements.yml -p /home/runner/.ansible/collections --force-with-deps
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Install ansible-lint custom rules
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
repository: ansible-middleware/ansible-lint-custom-rules
|
|
||||||
path: ansible-lint-custom-rules/
|
|
||||||
|
|
||||||
- name: Run linter
|
|
||||||
run: |
|
|
||||||
ansible-lint --version
|
|
||||||
ansible-lint -v
|
|
||||||
working-directory: ./ansible_collections/middleware_automation/keycloak
|
|
||||||
|
|
||||||
sanity:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
python_version: ["3.8", "3.9", "3.11"]
|
|
||||||
ansible_version: ["2.11", "2.15"]
|
|
||||||
exclude:
|
|
||||||
- python_version: "3.8"
|
|
||||||
ansible_version: "2.15"
|
|
||||||
- python_version: "3.9"
|
|
||||||
ansible_version: "2.15"
|
|
||||||
- python_version: "3.11"
|
|
||||||
ansible_version: "2.11"
|
|
||||||
steps:
|
|
||||||
- name: Check out code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
path: ansible_collections/middleware_automation/keycloak
|
|
||||||
|
|
||||||
- name: Set up Python ${{ matrix.python_version }}
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python_version }}
|
|
||||||
cache: 'pip'
|
|
||||||
|
|
||||||
- name: Create default collection path
|
|
||||||
run: |
|
|
||||||
mkdir -p /home/runner/.ansible/
|
|
||||||
ln -s ${{ github.workspace }} /home/runner/.ansible/collections
|
|
||||||
|
|
||||||
- name: Install ansible-core stable-${{ matrix.ansible_version }}
|
|
||||||
run: |
|
|
||||||
pip install https://github.com/ansible/ansible/archive/stable-${{ matrix.ansible_version }}.tar.gz --disable-pip-version-check
|
|
||||||
|
|
||||||
- name: Run sanity tests
|
|
||||||
run: ansible-test sanity -v --color --docker --python ${{ matrix.python_version }} --exclude docs/conf.py --exclude changelogs/fragments/.gitignore --skip-test symlinks
|
|
||||||
working-directory: ./ansible_collections/middleware_automation/keycloak
|
|
||||||
|
|
||||||
molecule:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
python_version: ["3.11"]
|
|
||||||
ansible_version: ["2.14", "2.15"]
|
|
||||||
molecule_test:
|
|
||||||
- default
|
|
||||||
- quarkus
|
|
||||||
- overridexml
|
|
||||||
steps:
|
|
||||||
- name: Check out code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
path: ansible_collections/middleware_automation/keycloak
|
|
||||||
|
|
||||||
- name: Set up Python ${{ matrix.python_version }}
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python_version }}
|
|
||||||
cache: 'pip'
|
|
||||||
|
|
||||||
- name: Install yamllint, ansible and molecule
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install 'molecule>=5.0.1' 'molecule-plugins[docker]>=23.0.0' ansible-core==${{ matrix.ansible_version }}
|
|
||||||
if [ -f ansible_collections/middleware_automation/keycloak/requirements.txt ]; then
|
|
||||||
pip install -r ansible_collections/middleware_automation/keycloak/requirements.txt
|
|
||||||
fi
|
|
||||||
if [ -f ansible_collections/middleware_automation/keycloak/requirements.yml ]; then
|
|
||||||
ansible-galaxy collection install -r ansible_collections/middleware_automation/keycloak/requirements.yml -p /home/runner/.ansible/collections --force-with-deps
|
|
||||||
fi
|
|
||||||
if [ -f ansible_collections/middleware_automation/keycloak/molecule/requirements.yml ]; then
|
|
||||||
ansible-galaxy collection install -r ansible_collections/middleware_automation/keycloak/molecule/requirements.yml -p /home/runner/.ansible/collections
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Run molecule test
|
|
||||||
run: |
|
|
||||||
molecule --version
|
|
||||||
molecule test -s ${{ matrix.molecule_test }}
|
|
||||||
working-directory: ./ansible_collections/middleware_automation/keycloak
|
|
||||||
env:
|
|
||||||
PY_COLORS: '1'
|
|
||||||
ANSIBLE_FORCE_COLOR: '1'
|
|
||||||
ANSIBLE_VERBOSITY: '1'
|
|
||||||
|
|
57
.github/workflows/docs.yml
vendored
57
.github/workflows/docs.yml
vendored
|
@ -8,57 +8,10 @@ on:
|
||||||
- "[0-9]+.[0-9]+.[0-9]+"
|
- "[0-9]+.[0-9]+.[0-9]+"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
env:
|
|
||||||
COLORTERM: 'yes'
|
|
||||||
TERM: 'xterm-256color'
|
|
||||||
PYTEST_ADDOPTS: '--color=yes'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docs:
|
docs:
|
||||||
runs-on: ubuntu-latest
|
uses: ansible-middleware/github-actions/.github/workflows/docs.yml@main
|
||||||
if: github.repository == 'ansible-middleware/keycloak'
|
secrets: inherit
|
||||||
permissions:
|
with:
|
||||||
actions: write
|
fqcn: 'middleware_automation/keycloak'
|
||||||
checks: write
|
collection_fqcn: 'middleware_automation.keycloak'
|
||||||
contents: write
|
|
||||||
deployments: write
|
|
||||||
packages: write
|
|
||||||
pages: write
|
|
||||||
steps:
|
|
||||||
- name: Check out code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
path: ansible_collections/middleware_automation/keycloak
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: 3.11
|
|
||||||
cache: 'pip'
|
|
||||||
|
|
||||||
- name: Install doc dependencies
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install -r ansible_collections/middleware_automation/keycloak/docs/requirements.txt
|
|
||||||
pip install -r ansible_collections/middleware_automation/keycloak/requirements.txt
|
|
||||||
sudo apt --fix-missing update
|
|
||||||
sudo apt install -y sed hub
|
|
||||||
|
|
||||||
- name: Create default collection path
|
|
||||||
run: |
|
|
||||||
mkdir -p /home/runner/.ansible/
|
|
||||||
ln -s /home/runner/work/keycloak/keycloak /home/runner/.ansible/collections
|
|
||||||
|
|
||||||
- name: Create changelog and documentation
|
|
||||||
uses: ansible-middleware/collection-docs-action@main
|
|
||||||
with:
|
|
||||||
collection_fqcn: middleware_automation.keycloak
|
|
||||||
collection_repo: ansible-middleware/keycloak
|
|
||||||
dependencies: false
|
|
||||||
commit_changelog: false
|
|
||||||
commit_ghpages: true
|
|
||||||
changelog_release: false
|
|
||||||
generate_docs: true
|
|
||||||
path: ansible_collections/middleware_automation/keycloak
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue