-
Notifications
You must be signed in to change notification settings - Fork 6
114 lines (98 loc) · 3.61 KB
/
antsibull-docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
---
# 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
persist-credentials: false
- name: Checkout antsibull-docs-parser main
uses: actions/checkout@v4
with:
repository: ansible-community/antsibull-docs-parser
ref: main
path: antsibull-docs-parser
persist-credentials: false
- name: Check out dependent project antsibull-fileutils
uses: actions/checkout@v4
with:
repository: ansible-community/antsibull-fileutils
path: antsibull-fileutils
persist-credentials: false
# nb: this is the first version of antsibull-docs that declares support
# for antsibull-core v3.
- name: Check out antsibull-docs main
uses: actions/checkout@v4
with:
repository: ansible-community/antsibull-docs
ref: 2.9.0
path: antsibull-docs
persist-credentials: false
- name: Patch antsibull-docs noxfile.py
run: |
sed -i noxfile.py -e 's/args = ("antsibull-core", "antsibull-docs-parser")/args = ("antsibull-core", "antsibull-docs-parser", "antsibull-fileutils")/g'
working-directory: antsibull-docs
- name: Set up Python 3.13
id: python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install dependencies
env:
PYTHON: "${{ steps.python.outputs.python-path }}"
run: |
pipx install --python "${PYTHON}" nox
python -m venv venv
. ./venv/bin/activate
python -m pip install . ../antsibull-core ../antsibull-docs-parser ../antsibull-fileutils
working-directory: antsibull-docs
- name: Run type checkers
run: |
nox -e typing
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:==3.0.0' 'sensu.sensu_go:==1.14.0'
git clone https://github.com/ansible-collections/community.crypto.git ~/.ansible/collections/ansible_collections/community/crypto --branch 2.15.0
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