Skip to content

antsibull-docs compatibility #440

antsibull-docs compatibility

antsibull-docs compatibility #440

---
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
# Run some antsibull-docs 1.8.0 tests against the current development version of antsibull-core
# to make sure we don't accidentally break compatibility.
name: antsibull-docs compatibility
on:
push:
branches:
- main
- stable-*
pull_request:
branches:
- main
- stable-*
# Run once per week (Monday at 04:00 UTC)
schedule:
- cron: '0 4 * * 1'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out antsibull-core
uses: actions/checkout@v4
with:
path: antsibull-core
# nb: this is the first version of antsibull-docs that declares support
# for antsibull-core v2
- name: Check out antsibull-docs 1.8.0
uses: actions/checkout@v4
with:
repository: ansible-community/antsibull-docs
ref: 1.8.0
path: antsibull-docs
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
python3 -m venv venv
. ./venv/bin/activate
python -m pip install --upgrade pip
python -m pip install . ../antsibull-core "pyre-check ~= 0.9"
working-directory: antsibull-docs
# pyre should complain if a signature changed in an incompatible way
- name: Lint with pyre
run: |
. ./venv/bin/activate
sed -i 's|poetry run||' ./lint-pyre.sh
./lint-pyre.sh
working-directory: antsibull-docs
- name: Use antsibull-docs sphinx-init
run: |
. ./venv/bin/activate
antsibull-docs sphinx-init --lenient --dest-dir . --use-current --sphinx-theme sphinx_rtd_theme
working-directory: antsibull-docs
- name: Install dependencies
run: |
. ./venv/bin/activate
pip install ansible-core -r requirements.txt
working-directory: antsibull-docs
- name: Install collections
run: |
. ./venv/bin/activate
ansible-galaxy collection install community.docker sensu.sensu_go
git clone https://github.com/ansible-collections/community.crypto.git ~/.ansible/collections/ansible_collections/community/crypto
working-directory: antsibull-docs
- name: Lint collection docs
run: |
. ./venv/bin/activate
antsibull-docs lint-collection-docs ~/.ansible/collections/ansible_collections/community/docker
working-directory: antsibull-docs
- name: Build docsite
run: |
. ./venv/bin/activate
./build.sh
working-directory: antsibull-docs