-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13: 4.0.0 version
- added full test coverage with standard unit tests - NEW FUNCTIONALITY: added template repository manipulation class DomainConnectTemplates
- Loading branch information
Showing
28 changed files
with
3,600 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[run] | ||
branch = False | ||
|
||
[report] | ||
; Regexes for lines to exclude from consideration | ||
exclude_also = | ||
; Don't complain if non-runnable code isn't run: | ||
if 0: | ||
if __name__ == .__main__.: | ||
|
||
; Don't complain about abstract methods, they aren't run: | ||
@(abc\.)?abstractmethod | ||
|
||
ignore_errors = True | ||
omit = | ||
# omit everything in /test | ||
./test/* | ||
|
||
[html] | ||
directory = htmlcov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
name: Python package | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
tags: | ||
- '*' | ||
pull_request: | ||
branches: [ master ] | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
include: | ||
- python-version: 2.7 | ||
os: ubuntu-20.04 | ||
- python-version: 3.6 | ||
os: ubuntu-20.04 | ||
- python-version: 3.7 | ||
os: ubuntu-22.04 | ||
- python-version: 3.8 | ||
os: ubuntu-22.04 | ||
- python-version: 3.9 | ||
os: ubuntu-22.04 | ||
- python-version: "3.10" | ||
os: ubuntu-22.04 | ||
- python-version: "3.11" | ||
os: ubuntu-22.04 | ||
- python-version: "3.12" | ||
os: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} != 2.7 | ||
if: ${{ matrix.python-version != '2.7' }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Set up Python 2.7 | ||
if: ${{ matrix.python-version == '2.7' }} | ||
run: | | ||
sudo ln -sf /usr/bin/python2.7 /usr/bin/python | ||
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py | ||
sudo python get-pip.py | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements-test.txt | ||
- name: Test with pytest | ||
run: | | ||
pytest | ||
build-distribution: | ||
needs: test | ||
runs-on: ubuntu-22.04 | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.12 | ||
|
||
- name: Upgrade pip | ||
run: python -m pip install --upgrade pip | ||
|
||
- name: Install build dependencies | ||
run: pip install setuptools wheel | ||
|
||
- name: Build distribution packages | ||
run: python setup.py sdist bdist_wheel | ||
|
||
- name: Upload distribution packages as artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: dist-files | ||
path: dist/* | ||
|
||
test-installation: | ||
needs: build-distribution | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
include: | ||
- python-version: 2.7 | ||
os: ubuntu-20.04 | ||
- python-version: 3.6 | ||
os: ubuntu-20.04 | ||
- python-version: 3.7 | ||
os: ubuntu-22.04 | ||
- python-version: 3.8 | ||
os: ubuntu-22.04 | ||
- python-version: 3.9 | ||
os: ubuntu-22.04 | ||
- python-version: "3.10" | ||
os: ubuntu-22.04 | ||
- python-version: "3.11" | ||
os: ubuntu-22.04 | ||
- python-version: "3.12" | ||
os: ubuntu-22.04 | ||
|
||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | ||
steps: | ||
- name: Set up Python ${{ matrix.python-version }} != 2.7 | ||
if: ${{ matrix.python-version != '2.7' }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Set up Python 2.7 | ||
if: ${{ matrix.python-version == '2.7' }} | ||
run: | | ||
sudo ln -sf /usr/bin/python2.7 /usr/bin/python | ||
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py | ||
sudo python get-pip.py | ||
- name: Upgrade pip | ||
run: python -m pip install --upgrade pip | ||
|
||
- name: Download distribution packages | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: dist-files | ||
path: dist | ||
|
||
- name: Install package from sdist | ||
run: pip install dist/*.tar.gz | ||
|
||
- name: Install package from wheel | ||
run: | | ||
pip uninstall -y domainconnectzone # Uninstall sdist version first | ||
pip install dist/*.whl | ||
- name: Verify installation | ||
run: | | ||
python -c "import domainconnectzone; print('Package is installed and importable')" | ||
# Optionally, run tests after installation | ||
# python -m unittest discover tests | ||
deploy: | ||
needs: test-installation | ||
runs-on: ubuntu-22.04 | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | ||
steps: | ||
- name: Download distribution packages | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: dist-files | ||
path: dist | ||
- name: Build and publish to PyPI | ||
uses: pypa/[email protected] | ||
with: | ||
user: domain-connect | ||
password: ${{ secrets.PYPI_PASSWORD }} | ||
skip_existing: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,3 +106,7 @@ venv.bak/ | |
# IDEA/JetBrains IDE | ||
.idea/ | ||
|
||
/node_modules/.yarn-integrity | ||
/yarn.lock | ||
|
||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
prune test/ |
Oops, something went wrong.