Skip to content

Commit

Permalink
v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Paebbels authored Feb 5, 2023
2 parents 57ccf30 + 3245bd1 commit a9fa259
Show file tree
Hide file tree
Showing 37 changed files with 2,367 additions and 124 deletions.
188 changes: 94 additions & 94 deletions .github/workflows/Pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,44 +13,44 @@ jobs:
with:
name: VHDLDomain

UnitTesting:
uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@dev
needs:
- Params
with:
jobs: ${{ needs.Params.outputs.python_jobs }}
artifact: ${{ fromJson(needs.Params.outputs.artifact_names).unittesting_xml }}

Coverage:
uses: pyTooling/Actions/.github/workflows/CoverageCollection.yml@dev
needs:
- Params
with:
python_version: ${{ needs.Params.outputs.python_version }}
artifact: ${{ fromJson(needs.Params.outputs.artifact_names).codecoverage_html }}
secrets:
codacy_token: ${{ secrets.CODACY_PROJECT_TOKEN }}

StaticTypeCheck:
uses: pyTooling/Actions/.github/workflows/StaticTypeCheck.yml@dev
needs:
- Params
with:
python_version: ${{ needs.Params.outputs.python_version }}
requirements: '-r tests/requirements.txt'
commands: mypy --html-report htmlmypy -p VHDLDomain
html_artifact: ${{ fromJson(needs.Params.outputs.artifact_names).statictyping_html }}

PublishTestResults:
uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@dev
needs:
- UnitTesting
# UnitTesting:
# uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@dev
# needs:
# - Params
# with:
# jobs: ${{ needs.Params.outputs.python_jobs }}
# artifact: ${{ fromJson(needs.Params.outputs.artifact_names).unittesting_xml }}
#
# Coverage:
# uses: pyTooling/Actions/.github/workflows/CoverageCollection.yml@dev
# needs:
# - Params
# with:
# python_version: ${{ needs.Params.outputs.python_version }}
# artifact: ${{ fromJson(needs.Params.outputs.artifact_names).codecoverage_html }}
# secrets:
# codacy_token: ${{ secrets.CODACY_PROJECT_TOKEN }}
#
# StaticTypeCheck:
# uses: pyTooling/Actions/.github/workflows/StaticTypeCheck.yml@dev
# needs:
# - Params
# with:
# python_version: ${{ needs.Params.outputs.python_version }}
# requirements: '-r tests/requirements.txt'
# commands: mypy --html-report htmlmypy -p VHDLDomain
# html_artifact: ${{ fromJson(needs.Params.outputs.artifact_names).statictyping_html }}
#
# PublishTestResults:
# uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@dev
# needs:
# - UnitTesting

Package:
uses: pyTooling/Actions/.github/workflows/Package.yml@dev
needs:
- Params
- Coverage
# - Coverage
with:
python_version: ${{ needs.Params.outputs.python_version }}
artifact: ${{ fromJson(needs.Params.outputs.artifact_names).package_all }}
Expand All @@ -59,9 +59,9 @@ jobs:
uses: pyTooling/Actions/.github/workflows/Release.yml@dev
if: startsWith(github.ref, 'refs/tags')
needs:
- UnitTesting
- Coverage
- StaticTypeCheck
# - UnitTesting
# - Coverage
# - StaticTypeCheck
- Package

PublishOnPyPI:
Expand All @@ -78,61 +78,61 @@ jobs:
secrets:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

VerifyDocs:
needs:
- Params
name: 👍 Verify example snippets using Python ${{ needs.Params.outputs.python_version }}
runs-on: ubuntu-latest

steps:
- name: ⏬ Checkout repository
uses: actions/checkout@v3

- name: ⚙ Setup GHDL
uses: ghdl/setup-ghdl-ci@master

- name: 🐍 Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
# python-version: ${{ needs.Params.outputs.python_version }}

- name: 🐍 Install dependencies
run: |
pip3 install --disable-pip-version-check git+https://github.com/ghdl/ghdl.git@$(ghdl version hash)
- name: ✂ Extract code snippet from README
shell: python
run: |
from pathlib import Path
import re
ROOT = Path('.')
with (ROOT / 'README.md').open('r') as rptr:
content = rptr.read()
m = re.search(r"```py(thon)?(?P<code>.*?)```", content, re.MULTILINE|re.DOTALL)
if m is None:
raise Exception("Regular expression did not find the example in the README!")
with (ROOT / 'tests/docs/example.py').open('w') as wptr:
wptr.write(m["code"])
# - name: Print example.py
# run: cat tests/docs/example.py

- name: ☑ Run example snippet
working-directory: tests/docs
run: |
python3 example.py
# VerifyDocs:
# needs:
# - Params
# name: 👍 Verify example snippets using Python ${{ needs.Params.outputs.python_version }}
# runs-on: ubuntu-latest
#
# steps:
# - name: ⏬ Checkout repository
# uses: actions/checkout@v3
#
# - name: ⚙ Setup GHDL
# uses: ghdl/setup-ghdl-ci@master
#
# - name: 🐍 Setup Python
# uses: actions/setup-python@v4
# with:
# python-version: "3.10"
## python-version: ${{ needs.Params.outputs.python_version }}
#
# - name: 🐍 Install dependencies
# run: |
# pip3 install --disable-pip-version-check git+https://github.com/ghdl/ghdl.git@$(ghdl version hash)
#
# - name: ✂ Extract code snippet from README
# shell: python
# run: |
# from pathlib import Path
# import re
#
# ROOT = Path('.')
#
# with (ROOT / 'README.md').open('r') as rptr:
# content = rptr.read()
#
# m = re.search(r"```py(thon)?(?P<code>.*?)```", content, re.MULTILINE|re.DOTALL)
#
# if m is None:
# raise Exception("Regular expression did not find the example in the README!")
#
# with (ROOT / 'tests/docs/example.py').open('w') as wptr:
# wptr.write(m["code"])
#
## - name: Print example.py
## run: cat tests/docs/example.py
#
# - name: ☑ Run example snippet
# working-directory: tests/docs
# run: |
# python3 example.py

BuildTheDocs:
uses: pyTooling/Actions/.github/workflows/BuildTheDocs.yml@dev
needs:
- Params
- VerifyDocs
# - VerifyDocs
with:
artifact: ${{ fromJson(needs.Params.outputs.artifact_names).documentation_html }}

Expand All @@ -141,23 +141,23 @@ jobs:
needs:
- Params
- BuildTheDocs
- Coverage
- StaticTypeCheck
# - Coverage
# - StaticTypeCheck
with:
doc: ${{ fromJson(needs.Params.outputs.artifact_names).documentation_html }}
coverage: ${{ fromJson(needs.Params.outputs.artifact_names).codecoverage_html }}
typing: ${{ fromJson(needs.Params.outputs.artifact_names).statictyping_html }}
# coverage: ${{ fromJson(needs.Params.outputs.artifact_names).codecoverage_html }}
# typing: ${{ fromJson(needs.Params.outputs.artifact_names).statictyping_html }}

ArtifactCleanUp:
uses: pyTooling/Actions/.github/workflows/ArtifactCleanUp.yml@dev
needs:
- Params
- UnitTesting
- Coverage
- StaticTypeCheck
# - UnitTesting
# - Coverage
# - StaticTypeCheck
- BuildTheDocs
- PublishToGitHubPages
- PublishTestResults
# - PublishTestResults
with:
package: ${{ fromJson(needs.Params.outputs.artifact_names).package_all }}
remaining: |
Expand Down
1 change: 1 addition & 0 deletions .idea/VHDLDomain.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a9fa259

Please sign in to comment.