-
Notifications
You must be signed in to change notification settings - Fork 31
130 lines (115 loc) · 4.21 KB
/
antsibull-build.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
---
# 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
name: antsibull-build tests
on:
push:
branches: [main]
pull_request:
branches: [main]
# Run once per week (Monday at 04:00 UTC)
schedule:
- cron: '0 4 * * 1'
env:
FORCE_COLOR: "1"
OTHER_ANTSIBULL_MODE: local
jobs:
build:
name: 'Build Ansible community distribution (${{ matrix.name }})'
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: Ansible 8
options: '-e antsibull_ansible_version=8.99.0'
python: '3.9'
antsibull_changelog_ref: 0.31.0
antsibull_core_ref: main
antsibull_docs_parser_ref: 1.1.0
antsibull_docutils_ref: 1.0.0
antsibull_fileutils_ref: main
- name: Ansible 9
options: '-e antsibull_ansible_version=9.99.0'
python: '3.11'
antsibull_changelog_ref: main
antsibull_core_ref: main
antsibull_docs_parser_ref: main
antsibull_docutils_ref: main
antsibull_fileutils_ref: main
- name: Ansible 10
options: '-e antsibull_ansible_version=10.99.0'
python: '3.12'
antsibull_changelog_ref: main
antsibull_core_ref: main
antsibull_docs_parser_ref: main
antsibull_docutils_ref: main
antsibull_fileutils_ref: main
- name: Ansible 11
options: '-e antsibull_ansible_version=11.99.0'
python: '3.13'
antsibull_changelog_ref: main
antsibull_core_ref: main
antsibull_docs_parser_ref: main
antsibull_docutils_ref: main
antsibull_fileutils_ref: main
steps:
- name: Check out antsibull-build
uses: actions/checkout@v4
with:
path: antsibull-build
- name: Check out dependent project antsibull-changelog
uses: actions/checkout@v4
with:
repository: ansible-community/antsibull-changelog
path: antsibull-changelog
ref: ${{ matrix.antsibull_changelog_ref }}
- name: Check out dependent project antsibull-core
uses: actions/checkout@v4
with:
repository: ansible-community/antsibull-core
path: antsibull-core
ref: ${{ matrix.antsibull_core_ref }}
- name: Check out dependent project antsibull-docs-parser
uses: actions/checkout@v4
with:
repository: ansible-community/antsibull-docs-parser
path: antsibull-docs-parser
ref: ${{ matrix.antsibull_docs_parser_ref }}
- name: Check out dependent project antsibull-docutils
uses: actions/checkout@v4
with:
repository: ansible-community/antsibull-docutils
path: antsibull-docutils
ref: ${{ matrix.antsibull_docutils_ref }}
- name: Check out dependent project antsibull-fileutils
uses: actions/checkout@v4
with:
repository: ansible-community/antsibull-fileutils
path: antsibull-fileutils
ref: ${{ matrix.antsibull_fileutils_ref }}
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
# Use pip manually to ensure the correct Python is used
- name: Install nox
run: pip install --user -U nox
- name: "Test building a release: ${{ matrix.name }}"
run: |
nox -e coverage_release -- ${{ matrix.options }}
env:
# Since antsibull was renamed to antsibull-build, paths during the bytecompile test
# are too long and bytecompile fails with "OSError: AF_UNIX path too long".
ANTSIBULL_COVERAGE_RELEASE_FORCE_TMPDIR: /tmp
working-directory: antsibull-build
- name: Report coverage
run: |
nox -v -e coverage
working-directory: antsibull-build
- name: Upload coverage
uses: codecov/codecov-action@v5
with:
working-directory: antsibull-build
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}