ansible-doc-template-extractor 0.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ansible_doc_template_extractor-0.5.0/.bandit.toml +8 -0
- ansible_doc_template_extractor-0.5.0/.flake8 +12 -0
- ansible_doc_template_extractor-0.5.0/.github/workflows/notify.yml +35 -0
- ansible_doc_template_extractor-0.5.0/.github/workflows/publish.yml +221 -0
- ansible_doc_template_extractor-0.5.0/.github/workflows/test.yml +207 -0
- ansible_doc_template_extractor-0.5.0/.gitignore +26 -0
- ansible_doc_template_extractor-0.5.0/.mailmap +7 -0
- ansible_doc_template_extractor-0.5.0/.pylintrc +675 -0
- ansible_doc_template_extractor-0.5.0/.ruff.toml +27 -0
- ansible_doc_template_extractor-0.5.0/AUTHORS.md +7 -0
- ansible_doc_template_extractor-0.5.0/CODE_OF_CONDUCT.rst +54 -0
- ansible_doc_template_extractor-0.5.0/CONTRIBUTING.rst +90 -0
- ansible_doc_template_extractor-0.5.0/DOC1.1.txt +25 -0
- ansible_doc_template_extractor-0.5.0/LICENSE +176 -0
- ansible_doc_template_extractor-0.5.0/Makefile +431 -0
- ansible_doc_template_extractor-0.5.0/PKG-INFO +106 -0
- ansible_doc_template_extractor-0.5.0/README.md +70 -0
- ansible_doc_template_extractor-0.5.0/SECURITY.md +21 -0
- ansible_doc_template_extractor-0.5.0/done/.dummy +0 -0
- ansible_doc_template_extractor-0.5.0/examples/roles/role_with_inparams/meta/argument_specs.yml +74 -0
- ansible_doc_template_extractor-0.5.0/examples/templates/role.md.j2 +95 -0
- ansible_doc_template_extractor-0.5.0/pyproject.toml +79 -0
- ansible_doc_template_extractor-0.5.0/requirements-base.txt +15 -0
- ansible_doc_template_extractor-0.5.0/requirements-develop.txt +77 -0
- ansible_doc_template_extractor-0.5.0/requirements.txt +17 -0
- ansible_doc_template_extractor-0.5.0/setup.cfg +4 -0
- ansible_doc_template_extractor-0.5.0/src/ansible_doc_template_extractor/__init__.py +18 -0
- ansible_doc_template_extractor-0.5.0/src/ansible_doc_template_extractor/_version.py +40 -0
- ansible_doc_template_extractor-0.5.0/src/ansible_doc_template_extractor/_version_scm.py +34 -0
- ansible_doc_template_extractor-0.5.0/src/ansible_doc_template_extractor/ansible_doc_template_extractor.py +257 -0
- ansible_doc_template_extractor-0.5.0/src/ansible_doc_template_extractor.egg-info/PKG-INFO +106 -0
- ansible_doc_template_extractor-0.5.0/src/ansible_doc_template_extractor.egg-info/SOURCES.txt +35 -0
- ansible_doc_template_extractor-0.5.0/src/ansible_doc_template_extractor.egg-info/dependency_links.txt +1 -0
- ansible_doc_template_extractor-0.5.0/src/ansible_doc_template_extractor.egg-info/entry_points.txt +2 -0
- ansible_doc_template_extractor-0.5.0/src/ansible_doc_template_extractor.egg-info/requires.txt +3 -0
- ansible_doc_template_extractor-0.5.0/src/ansible_doc_template_extractor.egg-info/top_level.txt +1 -0
- ansible_doc_template_extractor-0.5.0/src/ansible_doc_template_extractor.egg-info/zip-safe +1 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# This GitHub workflow will send a notification to Slack when a scheduled test
|
|
2
|
+
# workflow completes.
|
|
3
|
+
|
|
4
|
+
# There needs to be a GitHub secret named "SLACK_HOOK" that is set to the
|
|
5
|
+
# incoming webhook URL for Slack. That webhook is tied to a Slack channel, so
|
|
6
|
+
# this workflow does not select the channel and relies on that default.
|
|
7
|
+
# Instructions to set up Slack for incoming webhooks are here:
|
|
8
|
+
# https://api.slack.com/messaging/webhooks.
|
|
9
|
+
|
|
10
|
+
name: notify
|
|
11
|
+
|
|
12
|
+
on:
|
|
13
|
+
workflow_run:
|
|
14
|
+
workflows:
|
|
15
|
+
- test
|
|
16
|
+
types:
|
|
17
|
+
- completed
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
|
|
21
|
+
notify:
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
if: ${{ github.event.workflow_run.event == 'schedule' }}
|
|
24
|
+
steps:
|
|
25
|
+
|
|
26
|
+
- name: Post status to Slack
|
|
27
|
+
run: |
|
|
28
|
+
run_id=$(echo "${{ github.event.workflow_run.url }}" | rev | cut -d '/' -f 1 | rev)
|
|
29
|
+
run_url="https://github.com/${{ github.repository }}/actions/runs/$run_id"
|
|
30
|
+
branch="${{ github.event.workflow_run.head_branch }}"
|
|
31
|
+
branch_url="https://github.com/${{ github.repository }}/commits/$branch"
|
|
32
|
+
repo_url="https://github.com/${{ github.repository }}/actions/workflows/test.yml"
|
|
33
|
+
emoji=$(if [[ "${{ github.event.workflow_run.conclusion }}" == "success" ]]; then echo ":white_check_mark:"; else echo ":x:"; fi)
|
|
34
|
+
json="{ \"text\": \"$emoji <$repo_url|${{ github.repository }}>: Scheduled run <$run_url|$run_id> on branch <$branch_url|$branch>: ${{ github.event.workflow_run.conclusion }}\" }"
|
|
35
|
+
curl -s -d "payload=$json" ${{ secrets.SLACK_HOOK }}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
# This GitHub workflow will publish the package to Pypi and create a new stable branch when releasing the main branch.
|
|
2
|
+
# For more information see:
|
|
3
|
+
# https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
|
4
|
+
# https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
|
|
5
|
+
|
|
6
|
+
name: publish
|
|
7
|
+
|
|
8
|
+
on:
|
|
9
|
+
push: # When pushing a tag
|
|
10
|
+
tags:
|
|
11
|
+
- "*"
|
|
12
|
+
- "!*a0" # Exclude initial tag for a new version
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
publish:
|
|
16
|
+
name: Build and publish to PyPI
|
|
17
|
+
if: startsWith(github.ref, 'refs/tags')
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
# This workflow uses Pypi trusted publishing, see https://docs.pypi.org/trusted-publishers/
|
|
20
|
+
# Requirements:
|
|
21
|
+
# - On the Pypi project, the GitHub repo must be defined as a trusted publisher
|
|
22
|
+
# - On the GitHub repo, an environment 'pypi' must exist
|
|
23
|
+
environment: pypi # For Pypi trusted publishing
|
|
24
|
+
permissions:
|
|
25
|
+
id-token: write # For Pypi trusted publishing
|
|
26
|
+
contents: write # For creating GitHub release
|
|
27
|
+
steps:
|
|
28
|
+
|
|
29
|
+
#-------- Info gathering and checks
|
|
30
|
+
- name: Set pushed tag
|
|
31
|
+
id: set-tag
|
|
32
|
+
uses: actions/github-script@v8
|
|
33
|
+
with:
|
|
34
|
+
result-encoding: string
|
|
35
|
+
script: |
|
|
36
|
+
const result = "${{ github.ref }}".match("refs/tags/(.*)$")[1]
|
|
37
|
+
console.log(result)
|
|
38
|
+
return result
|
|
39
|
+
- name: Check validity of pushed tag
|
|
40
|
+
run: |
|
|
41
|
+
if [[ ${{ steps.set-tag.outputs.result }} =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
|
42
|
+
echo "Pushed tag '${{ steps.set-tag.outputs.result }}' is valid";
|
|
43
|
+
else
|
|
44
|
+
echo "Pushed tag '${{ steps.set-tag.outputs.result }}' is invalid (must be 'M.N.U')";
|
|
45
|
+
false;
|
|
46
|
+
fi
|
|
47
|
+
- name: Determine whether releasing the main branch
|
|
48
|
+
id: set-is-main-branch
|
|
49
|
+
uses: actions/github-script@v8
|
|
50
|
+
with:
|
|
51
|
+
result-encoding: string
|
|
52
|
+
script: |
|
|
53
|
+
const resp = await github.rest.git.getRef({
|
|
54
|
+
owner: context.repo.owner,
|
|
55
|
+
repo: context.repo.repo,
|
|
56
|
+
ref: "heads/main",
|
|
57
|
+
})
|
|
58
|
+
const result = (resp.data.object.sha == "${{ github.sha }}")
|
|
59
|
+
console.log(result)
|
|
60
|
+
return result
|
|
61
|
+
env:
|
|
62
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
63
|
+
- name: Determine name of stable branch for pushed tag
|
|
64
|
+
id: set-stable-branch
|
|
65
|
+
uses: actions/github-script@v8
|
|
66
|
+
with:
|
|
67
|
+
result-encoding: string
|
|
68
|
+
script: |
|
|
69
|
+
const result = "stable_"+"${{ steps.set-tag.outputs.result }}".match("([0-9]+\.[0-9]+)\.")[1]
|
|
70
|
+
console.log(result)
|
|
71
|
+
return result
|
|
72
|
+
- name: Determine whether releasing stable branch for pushed tag
|
|
73
|
+
id: set-is-stable-branch
|
|
74
|
+
uses: actions/github-script@v8
|
|
75
|
+
with:
|
|
76
|
+
result-encoding: string
|
|
77
|
+
script: |
|
|
78
|
+
var resp
|
|
79
|
+
try {
|
|
80
|
+
resp = await github.rest.git.getRef({
|
|
81
|
+
owner: context.repo.owner,
|
|
82
|
+
repo: context.repo.repo,
|
|
83
|
+
ref: "heads/${{ steps.set-stable-branch.outputs.result }}",
|
|
84
|
+
})
|
|
85
|
+
}
|
|
86
|
+
catch(err) {
|
|
87
|
+
console.log("false (stable branch does not exist: "+err+")")
|
|
88
|
+
return false
|
|
89
|
+
}
|
|
90
|
+
const result = (resp.data.object.sha == "${{ github.sha }}")
|
|
91
|
+
console.log(result)
|
|
92
|
+
return result
|
|
93
|
+
env:
|
|
94
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
95
|
+
- name: Check released commit to be main branch or stable branch for pushed tag
|
|
96
|
+
run: |
|
|
97
|
+
if [[ ${{ steps.set-is-main-branch.outputs.result }} == 'false' && ${{ steps.set-is-stable-branch.outputs.result }} == 'false' ]]; then
|
|
98
|
+
echo "Released commit is not 'main' or '${{ steps.set-stable-branch.outputs.result }}' branch";
|
|
99
|
+
false;
|
|
100
|
+
fi
|
|
101
|
+
- name: Set update version
|
|
102
|
+
id: set-update-version
|
|
103
|
+
uses: actions/github-script@v8
|
|
104
|
+
with:
|
|
105
|
+
result-encoding: string
|
|
106
|
+
script: |
|
|
107
|
+
const result = "${{ steps.set-tag.outputs.result }}".match("[0-9]+\.[0-9]+\.([0-9]+)")[1]
|
|
108
|
+
console.log(result)
|
|
109
|
+
return result
|
|
110
|
+
- name: Check update version to be 0 when releasing main branch
|
|
111
|
+
if: ${{ steps.set-is-main-branch.outputs.result == 'true' }}
|
|
112
|
+
run: |
|
|
113
|
+
if [[ ${{ steps.set-update-version.outputs.result }} != '0' ]]; then
|
|
114
|
+
echo "Update version '${{ steps.set-update-version.outputs.result }}' in tag '${{ steps.set-tag.outputs.result }}' is invalid (must be 0 when releasing main branch)";
|
|
115
|
+
false;
|
|
116
|
+
fi
|
|
117
|
+
- name: Check update version to be non-0 when releasing stable branch for pushed tag
|
|
118
|
+
if: ${{ steps.set-is-stable-branch.outputs.result == 'true' }}
|
|
119
|
+
run: |
|
|
120
|
+
if [[ ${{ steps.set-update-version.outputs.result }} == '0' ]]; then
|
|
121
|
+
echo "Update version '${{ steps.set-update-version.outputs.result }}' in tag '${{ steps.set-tag.outputs.result }}' is invalid (must be non-0 when releasing stable branch for pushed tag)";
|
|
122
|
+
false;
|
|
123
|
+
fi
|
|
124
|
+
|
|
125
|
+
#-------- Setup of work environment
|
|
126
|
+
- name: Checkout repo
|
|
127
|
+
uses: actions/checkout@v5
|
|
128
|
+
with:
|
|
129
|
+
fetch-depth: 0
|
|
130
|
+
- name: Set up Python
|
|
131
|
+
uses: actions/setup-python@v6
|
|
132
|
+
with:
|
|
133
|
+
python-version: "3.14"
|
|
134
|
+
- name: Development setup
|
|
135
|
+
run: |
|
|
136
|
+
make develop
|
|
137
|
+
- name: Display Python packages
|
|
138
|
+
run: |
|
|
139
|
+
pip list
|
|
140
|
+
|
|
141
|
+
#-------- Publishing of package
|
|
142
|
+
- name: Build the distribution
|
|
143
|
+
run: |
|
|
144
|
+
make build
|
|
145
|
+
- name: Display the distribution directory
|
|
146
|
+
run: |
|
|
147
|
+
ls -l dist
|
|
148
|
+
- name: Publish distribution to PyPI
|
|
149
|
+
if: startsWith(github.ref, 'refs/tags')
|
|
150
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
151
|
+
with:
|
|
152
|
+
packages-dir: dist
|
|
153
|
+
# Pypi trusted publishing allows to have no password
|
|
154
|
+
|
|
155
|
+
#-------- Creation of Github release
|
|
156
|
+
- name: Determine whether release on Github exists for the pushed tag
|
|
157
|
+
id: set-release-exists
|
|
158
|
+
uses: octokit/request-action@v2.x
|
|
159
|
+
with:
|
|
160
|
+
route: GET /repos/${{ github.repository }}/releases/tags/${{ steps.set-tag.outputs.result }}
|
|
161
|
+
continue-on-error: true
|
|
162
|
+
env:
|
|
163
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
164
|
+
- name: Create release on Github for the pushed tag if it does not exist
|
|
165
|
+
if: ${{ steps.set-release-exists.outputs.status == 404 }}
|
|
166
|
+
uses: octokit/request-action@v2.x
|
|
167
|
+
with:
|
|
168
|
+
route: POST /repos/${{ github.repository }}/releases
|
|
169
|
+
env:
|
|
170
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
171
|
+
INPUT_TAG_NAME: ${{ steps.set-tag.outputs.result }}
|
|
172
|
+
INPUT_NAME: "Release ${{ steps.set-tag.outputs.result }}"
|
|
173
|
+
INPUT_BODY: "Change log https://ansible-doc-template-extractor.readthedocs.io/en/stable/changes.html"
|
|
174
|
+
|
|
175
|
+
#-------- Creation of stable branch
|
|
176
|
+
# Note: This does not seem to depend on the disablement of the "Restrict pushes
|
|
177
|
+
# that create matching branches" setting in the branch protection rules for stable_*.
|
|
178
|
+
# It is possible that this fails with HTTP 422, for unknown reasons.
|
|
179
|
+
- name: Create new stable branch when releasing main branch
|
|
180
|
+
if: steps.set-is-main-branch.outputs.result == 'true'
|
|
181
|
+
id: create-stable-branch
|
|
182
|
+
uses: actions/github-script@v8
|
|
183
|
+
with:
|
|
184
|
+
script: |
|
|
185
|
+
github.rest.git.createRef({
|
|
186
|
+
owner: context.repo.owner,
|
|
187
|
+
repo: context.repo.repo,
|
|
188
|
+
ref: "refs/heads/${{ steps.set-stable-branch.outputs.result }}",
|
|
189
|
+
sha: "${{ github.sha }}",
|
|
190
|
+
})
|
|
191
|
+
env:
|
|
192
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
193
|
+
continue-on-error: true
|
|
194
|
+
- name: Wait some time if HTTP error 422
|
|
195
|
+
if: steps.set-is-main-branch.outputs.result == 'true' && steps.create-stable-branch.outputs.status == 422
|
|
196
|
+
run: |
|
|
197
|
+
sleep 10
|
|
198
|
+
- name: Retry create new stable branch when releasing main branch if HTTP error 422
|
|
199
|
+
if: steps.set-is-main-branch.outputs.result == 'true' && steps.create-stable-branch.outputs.status == 422
|
|
200
|
+
id: create-stable-branch-2
|
|
201
|
+
uses: actions/github-script@v8
|
|
202
|
+
with:
|
|
203
|
+
script: |
|
|
204
|
+
github.rest.git.createRef({
|
|
205
|
+
owner: context.repo.owner,
|
|
206
|
+
repo: context.repo.repo,
|
|
207
|
+
ref: "refs/heads/${{ steps.set-stable-branch.outputs.result }}",
|
|
208
|
+
sha: "${{ github.sha }}",
|
|
209
|
+
})
|
|
210
|
+
env:
|
|
211
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
212
|
+
continue-on-error: true
|
|
213
|
+
- name: Handle HTTP error 422 from creating the new stable branch
|
|
214
|
+
if: steps.set-is-main-branch.outputs.result == 'true' && steps.create-stable-branch-2.outputs.status == 422
|
|
215
|
+
run: |
|
|
216
|
+
echo "Error: Creating the new stable branch ${{ steps.set-stable-branch.outputs.result }} failed twice, but the publish still succeeded. Create the new stable branch manually:"
|
|
217
|
+
echo "git checkout main"
|
|
218
|
+
echo "git pull"
|
|
219
|
+
echo "git checkout -b ${{ steps.set-stable-branch.outputs.result }}"
|
|
220
|
+
echo "git push --set-upstream origin ${{ steps.set-stable-branch.outputs.result }}"
|
|
221
|
+
false
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# This GitHub workflow will setup and run various kinds of tests with a variety of Python versions
|
|
2
|
+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
|
3
|
+
|
|
4
|
+
name: test
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
schedule:
|
|
8
|
+
# The schedule event always (and only) runs on the main branch.
|
|
9
|
+
- # cron (in UTC): minute hour day_of_month month day_of_week
|
|
10
|
+
cron: '00 22 * * SAT'
|
|
11
|
+
pull_request: # When creating a PR targeting these branches
|
|
12
|
+
branches:
|
|
13
|
+
- main
|
|
14
|
+
- stable_*
|
|
15
|
+
push: # When merging a PR targeting these branches (direct push is disabled)
|
|
16
|
+
branches:
|
|
17
|
+
- main
|
|
18
|
+
- stable_*
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
|
|
22
|
+
set_matrix:
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
outputs:
|
|
25
|
+
matrix: ${{ steps.select_matrix.outputs.matrix }}
|
|
26
|
+
steps:
|
|
27
|
+
- name: "Select matrix"
|
|
28
|
+
id: select_matrix
|
|
29
|
+
# Select full matrix when scheduled or when releasing, and normal matrix
|
|
30
|
+
# otherwise. The matrix is defined as a JSON string.
|
|
31
|
+
# This technique documented in:
|
|
32
|
+
# https://stackoverflow.com/questions/65384420/how-to-make-a-github-action-matrix-element-conditional
|
|
33
|
+
# TODO: Find a way to define this with less escapes.
|
|
34
|
+
run: |
|
|
35
|
+
if [[ "${{ github.event_name }}" == "schedule" || "${{ github.head_ref }}" =~ ^release_ ]]; then \
|
|
36
|
+
echo "matrix={ \
|
|
37
|
+
\"os\": [ \"ubuntu-latest\", \"macos-latest\", \"windows-latest\" ], \
|
|
38
|
+
\"python-version\": [ \"3.8\", \"3.9\", \"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\" ], \
|
|
39
|
+
\"exclude\": [ \
|
|
40
|
+
{ \
|
|
41
|
+
\"os\": \"ubuntu-latest\", \
|
|
42
|
+
\"python-version\": \"3.8\", \
|
|
43
|
+
} \
|
|
44
|
+
], \
|
|
45
|
+
\"include\": [ \
|
|
46
|
+
{ \
|
|
47
|
+
\"os\": \"ubuntu-22.04\", \
|
|
48
|
+
\"python-version\": \"3.8\", \
|
|
49
|
+
} \
|
|
50
|
+
] \
|
|
51
|
+
}" >> $GITHUB_OUTPUT; \
|
|
52
|
+
else \
|
|
53
|
+
echo "matrix={ \
|
|
54
|
+
\"os\": [ \"ubuntu-latest\" ], \
|
|
55
|
+
\"python-version\": [ \"3.14\" ], \
|
|
56
|
+
\"include\": [ \
|
|
57
|
+
{ \
|
|
58
|
+
\"os\": \"ubuntu-22.04\", \
|
|
59
|
+
\"python-version\": \"3.8\", \
|
|
60
|
+
}, \
|
|
61
|
+
{ \
|
|
62
|
+
\"os\": \"ubuntu-latest\", \
|
|
63
|
+
\"python-version\": \"3.9\", \
|
|
64
|
+
}, \
|
|
65
|
+
{ \
|
|
66
|
+
\"os\": \"macos-latest\", \
|
|
67
|
+
\"python-version\": \"3.8\", \
|
|
68
|
+
}, \
|
|
69
|
+
{ \
|
|
70
|
+
\"os\": \"macos-latest\", \
|
|
71
|
+
\"python-version\": \"3.14\", \
|
|
72
|
+
}, \
|
|
73
|
+
{ \
|
|
74
|
+
\"os\": \"windows-latest\", \
|
|
75
|
+
\"python-version\": \"3.8\", \
|
|
76
|
+
}, \
|
|
77
|
+
{ \
|
|
78
|
+
\"os\": \"windows-latest\", \
|
|
79
|
+
\"python-version\": \"3.14\", \
|
|
80
|
+
} \
|
|
81
|
+
] \
|
|
82
|
+
}" >> $GITHUB_OUTPUT; \
|
|
83
|
+
fi
|
|
84
|
+
- name: Show matrix in JSON
|
|
85
|
+
run: echo '${{ steps.select_matrix.outputs.matrix }}'
|
|
86
|
+
|
|
87
|
+
test:
|
|
88
|
+
needs: set_matrix
|
|
89
|
+
strategy:
|
|
90
|
+
fail-fast: false
|
|
91
|
+
max-parallel: 20
|
|
92
|
+
matrix: ${{ fromJson(needs.set_matrix.outputs.matrix) }}
|
|
93
|
+
runs-on: ${{ matrix.os }}
|
|
94
|
+
env:
|
|
95
|
+
PIP_DISABLE_PIP_VERSION_CHECK: 1
|
|
96
|
+
steps:
|
|
97
|
+
- name: Set run type (normal, scheduled, release)
|
|
98
|
+
id: set-run-type
|
|
99
|
+
uses: actions/github-script@v8
|
|
100
|
+
with:
|
|
101
|
+
result-encoding: string
|
|
102
|
+
script: |
|
|
103
|
+
var result
|
|
104
|
+
if ("${{ github.event_name }}" == "schedule") {
|
|
105
|
+
result = "scheduled"
|
|
106
|
+
} else if ("${{ github.head_ref }}".match(/^release_/)) {
|
|
107
|
+
result = "release"
|
|
108
|
+
} else {
|
|
109
|
+
result = "normal"
|
|
110
|
+
}
|
|
111
|
+
console.log(result)
|
|
112
|
+
return result
|
|
113
|
+
- name: Checkout repo
|
|
114
|
+
uses: actions/checkout@v5
|
|
115
|
+
with:
|
|
116
|
+
fetch-depth: 0
|
|
117
|
+
- name: Check commit messages - Signed-off-by
|
|
118
|
+
if: github.event_name != 'schedule'
|
|
119
|
+
uses: gsactions/commit-message-checker@v2
|
|
120
|
+
with:
|
|
121
|
+
pattern: '^Signed-off-by: [^<>]+ <[^<>]+>$'
|
|
122
|
+
flags: 'gm'
|
|
123
|
+
excludeDescription: true
|
|
124
|
+
excludeTitle: true
|
|
125
|
+
checkAllCommitMessages: true
|
|
126
|
+
accessToken: ${{ secrets.GITHUB_TOKEN }}
|
|
127
|
+
error: Commit message has no or incorrectly formatted signed-off-by line
|
|
128
|
+
- name: Check commit messages - Line length
|
|
129
|
+
if: github.event_name != 'schedule'
|
|
130
|
+
uses: gsactions/commit-message-checker@v2
|
|
131
|
+
with:
|
|
132
|
+
pattern: '^.{1,80}\n\n(.{0,80}\n)*.{0,80}$'
|
|
133
|
+
flags: ''
|
|
134
|
+
excludeDescription: true
|
|
135
|
+
excludeTitle: true
|
|
136
|
+
checkAllCommitMessages: true
|
|
137
|
+
accessToken: ${{ secrets.GITHUB_TOKEN }}
|
|
138
|
+
error: Commit message title or body exceeds maximum line length of 80
|
|
139
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
140
|
+
uses: actions/setup-python@v6
|
|
141
|
+
with:
|
|
142
|
+
python-version: ${{ matrix.python-version }}
|
|
143
|
+
- name: Display environment
|
|
144
|
+
env:
|
|
145
|
+
RUN_TYPE: ${{ steps.set-run-type.outputs.result }}
|
|
146
|
+
run: |
|
|
147
|
+
make env
|
|
148
|
+
- name: Display initial Python packages
|
|
149
|
+
run: |
|
|
150
|
+
echo "Installed Python packages:"
|
|
151
|
+
pip list
|
|
152
|
+
- name: Display platform
|
|
153
|
+
env:
|
|
154
|
+
RUN_TYPE: ${{ steps.set-run-type.outputs.result }}
|
|
155
|
+
run: |
|
|
156
|
+
make platform
|
|
157
|
+
- name: Install the package and its dependents
|
|
158
|
+
env:
|
|
159
|
+
RUN_TYPE: ${{ steps.set-run-type.outputs.result }}
|
|
160
|
+
run: |
|
|
161
|
+
make install
|
|
162
|
+
- name: Show installed package versions
|
|
163
|
+
run: |
|
|
164
|
+
echo "Installed Python packages:"
|
|
165
|
+
pip list
|
|
166
|
+
- name: Development setup
|
|
167
|
+
env:
|
|
168
|
+
RUN_TYPE: ${{ steps.set-run-type.outputs.result }}
|
|
169
|
+
run: |
|
|
170
|
+
make develop
|
|
171
|
+
- name: Show installed package versions
|
|
172
|
+
run: |
|
|
173
|
+
echo "Installed Python packages:"
|
|
174
|
+
pip list
|
|
175
|
+
- name: Run build
|
|
176
|
+
env:
|
|
177
|
+
RUN_TYPE: ${{ steps.set-run-type.outputs.result }}
|
|
178
|
+
run: |
|
|
179
|
+
make build
|
|
180
|
+
- name: Run check
|
|
181
|
+
env:
|
|
182
|
+
RUN_TYPE: ${{ steps.set-run-type.outputs.result }}
|
|
183
|
+
run: |
|
|
184
|
+
make check
|
|
185
|
+
- name: Run ruff
|
|
186
|
+
env:
|
|
187
|
+
RUN_TYPE: ${{ steps.set-run-type.outputs.result }}
|
|
188
|
+
run: |
|
|
189
|
+
make ruff
|
|
190
|
+
- name: Run pylint
|
|
191
|
+
env:
|
|
192
|
+
RUN_TYPE: ${{ steps.set-run-type.outputs.result }}
|
|
193
|
+
run: |
|
|
194
|
+
make pylint
|
|
195
|
+
- name: Run bandit
|
|
196
|
+
env:
|
|
197
|
+
RUN_TYPE: ${{ steps.set-run-type.outputs.result }}
|
|
198
|
+
run: |
|
|
199
|
+
make bandit
|
|
200
|
+
|
|
201
|
+
test_finish:
|
|
202
|
+
needs: test
|
|
203
|
+
runs-on: ubuntu-latest
|
|
204
|
+
steps:
|
|
205
|
+
- name: Dummy step to define required tests in GitHub
|
|
206
|
+
run: |
|
|
207
|
+
echo Dummy step to define required tests in GitHub
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Make targets
|
|
2
|
+
/done/*.done
|
|
3
|
+
|
|
4
|
+
# Make build
|
|
5
|
+
/build/
|
|
6
|
+
/dist/
|
|
7
|
+
/src/ansible_doc_template_extractor/_version_scm.py
|
|
8
|
+
/src/*.egg-info/
|
|
9
|
+
/MANIFEST
|
|
10
|
+
/MANIFEST.in
|
|
11
|
+
|
|
12
|
+
# Make test
|
|
13
|
+
__pycache__/
|
|
14
|
+
/.pytest_cache/
|
|
15
|
+
/htmlcov/
|
|
16
|
+
/.coverage
|
|
17
|
+
|
|
18
|
+
# Make build_doc
|
|
19
|
+
/build_docs/
|
|
20
|
+
|
|
21
|
+
# Other
|
|
22
|
+
*.swp
|
|
23
|
+
.DS_Store
|
|
24
|
+
/try/
|
|
25
|
+
*.log
|
|
26
|
+
*.tmp
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# git mailmap file for consolidating git commit names and email addresses
|
|
2
|
+
# For details, see: https://git-scm.com/docs/git-check-mailmap
|
|
3
|
+
#
|
|
4
|
+
# Format for replacing name and email based upon commit email:
|
|
5
|
+
# Proper Name <proper@email.xx> <commit@email.xx>
|
|
6
|
+
#
|
|
7
|
+
Andreas Maier <maiera@de.ibm.com> <andy-maier@users.noreply.github.com>
|