|
4 | 4 | push:
|
5 | 5 | workflow_dispatch:
|
6 | 6 | schedule:
|
7 |
| - - cron: '0 0 * * 5' |
| 7 | +# Every Friday at 22:00 - rerun pipeline to check for dependency-based issues |
| 8 | + - cron: '0 22 * * 5' |
8 | 9 |
|
9 | 10 | jobs:
|
10 |
| - |
11 |
| - Params: |
12 |
| - uses: pyTooling/Actions/.github/workflows/Parameters.yml@dev |
| 11 | + UnitTestingParams: |
| 12 | + uses: pyTooling/Actions/.github/workflows/Parameters.yml@r1 |
13 | 13 | with:
|
14 | 14 | name: pyVHDLModel
|
| 15 | + python_version_list: "3.9 3.10 3.11 3.12 pypy-3.9 pypy-3.10" |
| 16 | +# disable_list: "windows:pypy-3.8 windows:pypy-3.9 windows:pypy-3.10" |
15 | 17 |
|
16 | 18 | UnitTesting:
|
17 |
| - uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@dev |
| 19 | + uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@r1 |
18 | 20 | needs:
|
19 |
| - - Params |
| 21 | + - UnitTestingParams |
20 | 22 | with:
|
21 |
| - jobs: ${{ needs.Params.outputs.python_jobs }} |
22 |
| - artifact: ${{ fromJson(needs.Params.outputs.artifact_names).unittesting_xml }} |
| 23 | + jobs: ${{ needs.UnitTestingParams.outputs.python_jobs }} |
| 24 | + requirements: "-r tests/unit/requirements.txt" |
| 25 | + pacboy: "msys/git" |
| 26 | + unittest_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }} |
| 27 | + coverage_sqlite_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }} |
23 | 28 |
|
24 |
| - Coverage: |
25 |
| - uses: pyTooling/Actions/.github/workflows/CoverageCollection.yml@dev |
| 29 | + StaticTypeCheck: |
| 30 | + uses: pyTooling/Actions/.github/workflows/StaticTypeCheck.yml@r1 |
26 | 31 | needs:
|
27 |
| - - Params |
| 32 | + - UnitTestingParams |
28 | 33 | with:
|
29 |
| - python_version: ${{ needs.Params.outputs.python_version }} |
30 |
| - artifact: ${{ fromJson(needs.Params.outputs.artifact_names).codecoverage_html }} |
31 |
| - secrets: |
32 |
| - codacy_token: ${{ secrets.CODACY_PROJECT_TOKEN }} |
| 34 | + python_version: ${{ needs.UnitTestingParams.outputs.python_version }} |
| 35 | + commands: | |
| 36 | + mypy --html-report htmlmypy -p pyVHDLModel |
| 37 | + html_report: 'htmlmypy' |
| 38 | + html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }} |
| 39 | + |
| 40 | + DocCoverage: |
| 41 | + uses: pyTooling/Actions/.github/workflows/CheckDocumentation.yml@r1 |
| 42 | + needs: |
| 43 | + - UnitTestingParams |
| 44 | + with: |
| 45 | + python_version: ${{ needs.UnitTestingParams.outputs.python_version }} |
| 46 | + directory: pyVHDLModel |
| 47 | +# fail_below: 70 |
33 | 48 |
|
34 |
| - StaticTypeCheck: |
35 |
| - uses: pyTooling/Actions/.github/workflows/StaticTypeCheck.yml@dev |
| 49 | + Package: |
| 50 | + uses: pyTooling/Actions/.github/workflows/Package.yml@r1 |
36 | 51 | needs:
|
37 |
| - - Params |
| 52 | + - UnitTestingParams |
| 53 | + - UnitTesting |
38 | 54 | with:
|
39 |
| - python_version: ${{ needs.Params.outputs.python_version }} |
40 |
| - requirements: '-r tests/requirements.txt' |
41 |
| - commands: mypy --html-report htmlmypy -p pyVHDLModel |
42 |
| - html_artifact: ${{ fromJson(needs.Params.outputs.artifact_names).statictyping_html }} |
| 55 | + python_version: ${{ needs.UnitTestingParams.outputs.python_version }} |
| 56 | + artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }} |
| 57 | + |
| 58 | + PublishCoverageResults: |
| 59 | + uses: pyTooling/Actions/.github/workflows/PublishCoverageResults.yml@r1 |
| 60 | + needs: |
| 61 | + - UnitTestingParams |
| 62 | + - UnitTesting |
| 63 | + with: |
| 64 | +# coverage_sqlite_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }} |
| 65 | +# coverage_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_xml }} |
| 66 | + coverage_json_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }} |
| 67 | + coverage_html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }} |
| 68 | + secrets: |
| 69 | + codacy_token: ${{ secrets.CODACY_PROJECT_TOKEN }} |
43 | 70 |
|
44 | 71 | PublishTestResults:
|
45 |
| - uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@dev |
| 72 | + uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@r1 |
46 | 73 | needs:
|
| 74 | + - UnitTestingParams |
47 | 75 | - UnitTesting
|
| 76 | + with: |
| 77 | + merged_junit_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }} |
48 | 78 |
|
49 |
| - Package: |
50 |
| - uses: pyTooling/Actions/.github/workflows/Package.yml@dev |
| 79 | + IntermediateCleanUp: |
| 80 | + uses: pyTooling/Actions/.github/workflows/IntermediateCleanUp.yml@r1 |
51 | 81 | needs:
|
52 |
| - - Params |
53 |
| - - Coverage |
| 82 | + - UnitTestingParams |
| 83 | + - PublishCoverageResults |
| 84 | + - PublishTestResults |
| 85 | + - HTMLDocumentation |
| 86 | + with: |
| 87 | + sqlite_coverage_artifacts_prefix: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}- |
| 88 | + xml_unittest_artifacts_prefix: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}- |
| 89 | + |
| 90 | +# VerifyDocs: |
| 91 | +# uses: pyTooling/Actions/.github/workflows/VerifyDocs.yml@r1 |
| 92 | +# needs: |
| 93 | +# - UnitTestingParams |
| 94 | +# with: |
| 95 | +# python_version: ${{ needs.UnitTestingParams.outputs.python_version }} |
| 96 | + |
| 97 | + HTMLDocumentation: |
| 98 | + uses: pyTooling/Actions/.github/workflows/SphinxDocumentation.yml@r1 |
| 99 | + needs: |
| 100 | + - UnitTestingParams |
| 101 | + - PublishTestResults |
| 102 | + - PublishCoverageResults |
| 103 | +# - VerifyDocs |
54 | 104 | with:
|
55 |
| - python_version: ${{ needs.Params.outputs.python_version }} |
56 |
| - artifact: ${{ fromJson(needs.Params.outputs.artifact_names).package_all }} |
| 105 | + python_version: ${{ needs.UnitTestingParams.outputs.python_version }} |
| 106 | + unittest_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}-ubuntu-native-3.12 |
| 107 | + coverage_json_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }} |
| 108 | + html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_html }} |
| 109 | + latex_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_latex }} |
| 110 | + |
| 111 | +# PDFDocumentation: |
| 112 | +# uses: pyTooling/Actions/.github/workflows/LaTeXDocumentation.yml@r1 |
| 113 | +# needs: |
| 114 | +# - UnitTestingParams |
| 115 | +# - HTMLDocumentation |
| 116 | +# with: |
| 117 | +# document: pyVHDLModel |
| 118 | +# latex_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_latex }} |
| 119 | +# pdf_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_pdf }} |
57 | 120 |
|
58 |
| - Release: |
59 |
| - uses: pyTooling/Actions/.github/workflows/Release.yml@dev |
60 |
| - if: startsWith(github.ref, 'refs/tags') |
| 121 | + PublishToGitHubPages: |
| 122 | + uses: pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@r1 |
61 | 123 | needs:
|
62 |
| - - UnitTesting |
63 |
| - - Coverage |
| 124 | + - UnitTestingParams |
| 125 | + - HTMLDocumentation |
| 126 | +# - PDFDocumentation |
| 127 | + - PublishCoverageResults |
64 | 128 | - StaticTypeCheck
|
| 129 | + with: |
| 130 | + doc: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_html }} |
| 131 | +# coverage: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }} |
| 132 | + typing: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }} |
| 133 | + |
| 134 | + ReleasePage: |
| 135 | + uses: pyTooling/Actions/.github/workflows/Release.yml@r1 |
| 136 | + if: startsWith(github.ref, 'refs/tags') |
| 137 | + needs: |
65 | 138 | - Package
|
| 139 | + - PublishToGitHubPages |
66 | 140 |
|
67 | 141 | PublishOnPyPI:
|
68 |
| - uses: pyTooling/Actions/.github/workflows/PublishOnPyPI.yml@dev |
| 142 | + uses: pyTooling/Actions/.github/workflows/PublishOnPyPI.yml@r1 |
69 | 143 | if: startsWith(github.ref, 'refs/tags')
|
70 | 144 | needs:
|
71 |
| - - Params |
72 |
| - - Release |
73 |
| - - Package |
| 145 | + - UnitTestingParams |
| 146 | + - ReleasePage |
74 | 147 | with:
|
75 |
| - python_version: ${{ needs.Params.outputs.python_version }} |
| 148 | + python_version: ${{ needs.UnitTestingParams.outputs.python_version }} |
76 | 149 | requirements: -r dist/requirements.txt
|
77 |
| - artifact: ${{ fromJson(needs.Params.outputs.artifact_names).package_all }} |
| 150 | + artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }} |
78 | 151 | secrets:
|
79 | 152 | PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
|
80 | 153 |
|
81 |
| - VerifyDocs: |
82 |
| - needs: |
83 |
| - - Params |
84 |
| - name: 👍 Verify example snippets using Python ${{ needs.Params.outputs.python_version }} |
85 |
| - runs-on: ubuntu-latest |
86 |
| - |
87 |
| - steps: |
88 |
| - - name: ⏬ Checkout repository |
89 |
| - uses: actions/checkout@v3 |
90 |
| - |
91 |
| - - name: ⚙ Setup GHDL |
92 |
| - uses: ghdl/setup-ghdl-ci@master |
93 |
| - |
94 |
| - - name: 🐍 Setup Python |
95 |
| - uses: actions/setup-python@v4 |
96 |
| - with: |
97 |
| - python-version: "3.10" |
98 |
| -# python-version: ${{ needs.Params.outputs.python_version }} |
99 |
| - |
100 |
| - - name: 🐍 Install dependencies |
101 |
| - run: | |
102 |
| - pip3 install --disable-pip-version-check git+https://github.com/ghdl/ghdl.git@$(ghdl version hash) |
103 |
| -
|
104 |
| - - name: ✂ Extract code snippet from README |
105 |
| - shell: python |
106 |
| - run: | |
107 |
| - from pathlib import Path |
108 |
| - import re |
109 |
| -
|
110 |
| - ROOT = Path('.') |
111 |
| -
|
112 |
| - with (ROOT / 'README.md').open('r') as rptr: |
113 |
| - content = rptr.read() |
114 |
| -
|
115 |
| - m = re.search(r"```py(thon)?(?P<code>.*?)```", content, re.MULTILINE|re.DOTALL) |
116 |
| -
|
117 |
| - if m is None: |
118 |
| - raise Exception("Regular expression did not find the example in the README!") |
119 |
| -
|
120 |
| - with (ROOT / 'tests/docs/example.py').open('w') as wptr: |
121 |
| - wptr.write(m["code"]) |
122 |
| -
|
123 |
| -# - name: Print example.py |
124 |
| -# run: cat tests/docs/example.py |
125 |
| - |
126 |
| - - name: ☑ Run example snippet |
127 |
| - working-directory: tests/docs |
128 |
| - run: | |
129 |
| - python3 example.py |
130 |
| -
|
131 |
| - BuildTheDocs: |
132 |
| - uses: pyTooling/Actions/.github/workflows/BuildTheDocs.yml@dev |
133 |
| - needs: |
134 |
| - - Params |
135 |
| - - VerifyDocs |
136 |
| - with: |
137 |
| - artifact: ${{ fromJson(needs.Params.outputs.artifact_names).documentation_html }} |
138 |
| - |
139 |
| - PublishToGitHubPages: |
140 |
| - uses: pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@dev |
141 |
| - needs: |
142 |
| - - Params |
143 |
| - - BuildTheDocs |
144 |
| - - Coverage |
145 |
| - - StaticTypeCheck |
146 |
| - with: |
147 |
| - doc: ${{ fromJson(needs.Params.outputs.artifact_names).documentation_html }} |
148 |
| - coverage: ${{ fromJson(needs.Params.outputs.artifact_names).codecoverage_html }} |
149 |
| - typing: ${{ fromJson(needs.Params.outputs.artifact_names).statictyping_html }} |
150 |
| - |
151 | 154 | ArtifactCleanUp:
|
152 |
| - uses: pyTooling/Actions/.github/workflows/ArtifactCleanUp.yml@dev |
| 155 | + uses: pyTooling/Actions/.github/workflows/ArtifactCleanUp.yml@r1 |
153 | 156 | needs:
|
154 |
| - - Params |
| 157 | + - UnitTestingParams |
155 | 158 | - UnitTesting
|
156 |
| - - Coverage |
157 | 159 | - StaticTypeCheck
|
158 |
| - - BuildTheDocs |
159 |
| - - PublishToGitHubPages |
| 160 | + - HTMLDocumentation |
| 161 | +# - PDFDocumentation |
160 | 162 | - PublishTestResults
|
| 163 | + - PublishCoverageResults |
| 164 | + - PublishToGitHubPages |
| 165 | +# - PublishOnPyPI |
161 | 166 | with:
|
162 |
| - package: ${{ fromJson(needs.Params.outputs.artifact_names).package_all }} |
| 167 | + package: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }} |
163 | 168 | remaining: |
|
164 |
| - ${{ fromJson(needs.Params.outputs.artifact_names).unittesting_xml }}-* |
165 |
| - ${{ fromJson(needs.Params.outputs.artifact_names).codecoverage_html }} |
166 |
| - ${{ fromJson(needs.Params.outputs.artifact_names).statictyping_html }} |
167 |
| - ${{ fromJson(needs.Params.outputs.artifact_names).documentation_html }} |
| 169 | + ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}-* |
| 170 | + ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_html }}-* |
| 171 | + ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}-* |
| 172 | + ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_xml }}-* |
| 173 | + ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }}-* |
| 174 | + ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}-* |
| 175 | + ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }} |
| 176 | + ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_html }} |
| 177 | + ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }} |
| 178 | + ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_xml }} |
| 179 | + ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }} |
| 180 | + ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }} |
| 181 | + ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }} |
| 182 | + ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_html }} |
| 183 | + ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_latex }} |
| 184 | +# ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_pdf }} |
0 commit comments