Skip to content

Commit 60c4116

Browse files
authored
Make compatible with antsibull-core 2.x.y (#78)
* Make compatible with antsibull-core 2.x.y. * Linting with 3.11 fails as frozenlist cannot be installed.
1 parent ba4c1c6 commit 60c4116

File tree

5 files changed

+33
-16
lines changed

5 files changed

+33
-16
lines changed

.github/workflows/antsibull-docs.yml

+21-13
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,15 @@ jobs:
2424
matrix:
2525
options:
2626
- '--use-current --sphinx-theme sphinx_rtd_theme'
27-
- '--use-current --use-html-blobs --no-breadcrumbs community.crypto community.docker'
28-
- '--no-indexes --squash-hierarchy --intersphinx ansible6:https://docs.ansible.com/ansible/6/ community.crypto --collection-version 2.0.0'
27+
- '--no-indexes --squash-hierarchy --intersphinx ansible7:https://docs.ansible.com/ansible/6/ community.crypto --collection-version 2.0.0'
28+
python:
29+
- '3.11'
30+
antsibull_core_ref:
31+
- main
32+
include:
33+
- options: '--use-current --use-html-blobs --no-breadcrumbs community.crypto community.docker'
34+
python: '3.9'
35+
antsibull_core_ref: stable-1
2936

3037
steps:
3138
- name: Check out antsibull-docs
@@ -38,17 +45,18 @@ jobs:
3845
with:
3946
repository: ansible-community/antsibull-core
4047
path: antsibull-core
48+
ref: ${{ matrix.antsibull_core_ref }}
4149

42-
- name: Set up Python 3.10
50+
- name: Set up Python ${{ matrix.python }}
4351
uses: actions/setup-python@v4
4452
with:
45-
python-version: '3.10'
53+
python-version: ${{ matrix.python }}
4654

4755
- name: Install dependencies
4856
run: |
4957
python -m pip install --upgrade pip
5058
python -m pip install poetry
51-
sed -i -e 's/^python = .*/python = "^3.10"/' pyproject.toml
59+
sed -i -e 's/^python = .*/python = "^${{ matrix.python }}"/' pyproject.toml
5260
poetry install
5361
poetry update
5462
working-directory: antsibull-docs
@@ -126,23 +134,23 @@ jobs:
126134
repository: ansible-community/antsibull-core
127135
path: antsibull-core
128136

129-
- name: Set up Python 3.10
137+
- name: Set up Python 3.11
130138
uses: actions/setup-python@v4
131139
with:
132-
python-version: '3.10'
140+
python-version: '3.11'
133141

134142
- name: Install dependencies
135143
run: |
136144
python -m pip install --upgrade pip
137145
python -m pip install poetry
138-
sed -i -e 's/^python = .*/python = "^3.10"/' pyproject.toml
146+
sed -i -e 's/^python = .*/python = "^3.11"/' pyproject.toml
139147
poetry install
140148
poetry update
141149
working-directory: antsibull-docs
142150

143151
- name: Get hold of deps file
144152
run: |
145-
curl https://raw.githubusercontent.com/ansible-community/ansible-build-data/main/6/ansible-6.5.0.deps --output ansible.deps
153+
curl https://raw.githubusercontent.com/ansible-community/ansible-build-data/main/7/ansible-7.0.0.deps --output ansible.deps
146154
working-directory: antsibull-docs
147155

148156
- name: Build stable docs RST files
@@ -175,23 +183,23 @@ jobs:
175183
repository: ansible-community/antsibull-core
176184
path: antsibull-core
177185

178-
- name: Set up Python 3.10
186+
- name: Set up Python 3.11
179187
uses: actions/setup-python@v4
180188
with:
181-
python-version: '3.10'
189+
python-version: '3.11'
182190

183191
- name: Install dependencies
184192
run: |
185193
python -m pip install --upgrade pip
186194
python -m pip install poetry
187-
sed -i -e 's/^python = .*/python = "^3.10"/' pyproject.toml
195+
sed -i -e 's/^python = .*/python = "^3.11"/' pyproject.toml
188196
poetry install
189197
poetry update
190198
working-directory: antsibull-docs
191199

192200
- name: Get hold of ansible.in file
193201
run: |
194-
curl https://raw.githubusercontent.com/ansible-community/ansible-build-data/main/7/ansible.in --output ansible.in
202+
curl https://raw.githubusercontent.com/ansible-community/ansible-build-data/main/8/ansible.in --output ansible.in
195203
working-directory: antsibull-docs
196204

197205
- name: Build devel docs RST files

.github/workflows/pythonlinters.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
44
# SPDX-License-Identifier: GPL-3.0-or-later
55

6-
# This workflow will install Python 3.9 and other dependencies to lint the code.
6+
# This workflow will install Python 3.10 and other dependencies to lint the code.
77
# For more information see:
88
# https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
99

@@ -23,7 +23,7 @@ jobs:
2323
runs-on: ubuntu-latest
2424
strategy:
2525
matrix:
26-
python-version: [3.9]
26+
python-version: ['3.10']
2727

2828
steps:
2929
- name: Check out antsibull-docs
@@ -36,6 +36,8 @@ jobs:
3636
with:
3737
repository: ansible-community/antsibull-core
3838
path: antsibull-core
39+
# TODO: As long as we still support Python 3.6, 3.7, and 3.8, use stable-1 instead of main!
40+
ref: stable-1
3941

4042
- name: Set up Python ${{ matrix.python-version }}
4143
uses: actions/setup-python@v4

.github/workflows/pythontests.yml

+5
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ jobs:
2828
include:
2929
- python-version: '3.10'
3030
skip-is-error: true
31+
- python-version: '3.11'
32+
skip-is-error: true
3133

3234
steps:
3335
- name: Check out antsibull-docs
@@ -40,6 +42,9 @@ jobs:
4042
with:
4143
repository: ansible-community/antsibull-core
4244
path: antsibull-core
45+
# TODO: As long as we still support Python 3.6, 3.7, and 3.8, use stable-1 instead of main!
46+
ref: >-
47+
${{ contains(fromJson('["3.6", "3.7", "3.8"]'), matrix.python-version) && 'stable-1' || 'main' }}
4348
4449
- name: Set up Python ${{ matrix.python-version }}
4550
uses: actions/setup-python@v4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
minor_changes:
2+
- "Make compatible with antsibull-core 2.x.y (https://github.com/ansible-community/antsibull-docs/pull/78)."

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ antsibull-docs = "antsibull_docs.cli.antsibull_docs:main"
3535
[tool.poetry.dependencies]
3636
python = "^3.6.1"
3737
ansible-pygments = "*"
38-
antsibull-core = ">= 1.2.0, < 2.0.0"
38+
antsibull-core = ">= 1.2.0, < 3.0.0"
3939
asyncio-pool = "*"
4040
docutils = "*"
4141
jinja2 = "*"

0 commit comments

Comments
 (0)