@@ -50,86 +50,105 @@ jobs:
5050 - name : Install `generate-python` CLI
5151 run : pip install --user -e .
5252
53- # # GENERATE FROM TEMPLATE into gen/ ##
54- # ROOT : gen/biskotaki/pyproject.toml
55- - name : Generate Biskotaki from Template
56- run : |
57- echo " version: \"${{ env.PKG_VERSION }}\"" >> .github/biskotaki.yaml
58- generate-python -o gen --config-file ./.github/biskotaki.yaml --no-input -f --offline
59-
60- # # VALIDATE BISKOTAKI CI CONFIG file is in valid Yaml format ##
61- - name : " Validate YAML format"
62- run : |
63- GEN_CI_CONFIG=gen/biskotaki/.github/workflows/test.yaml
64- if [ ! $(yq eval 'true' "$GEN_CI_CONFIG") ]; then
65- echo "ERROR: $GEN_CI_CONFIG is malformed"
66- exit 1
67- fi
68-
69- # # Run Test Suite against the generated project ##
70- - name : Test distributions 'Source', 'Built' and 'edit' (dev env) mode installation
71- env :
72- TOXPYTHON : " python${{ env.PY_VERSION }}"
73- working-directory : gen/biskotaki
74- run : |
75- tox -e 'edit,sdist,wheel'
76- tox -e wheel-test
77- tox -e coverage
53+ # #### TEST 1: Generated Project with ./.github/biskotaki.yaml as User Config #####
54+
55+ # ## GENERATE FROM TEMPLATE into gen/ ##
56+ # # ROOT : gen/biskotaki/pyproject.toml
57+ # - name: Generate Biskotaki from Template
58+ # run: |
59+ # echo " version: \"${{ env.PKG_VERSION }}\"" >> .github/biskotaki.yaml
60+ # generate-python -o gen --config-file ./.github/biskotaki.yaml --no-input -f --offline
61+
62+ # ## VALIDATE BISKOTAKI CI CONFIG file is in valid Yaml format ##
63+ # - name: "Validate YAML format"
64+ # run: |
65+ # # At the moment the genraot can create 2 different designs of CI Pipeline
66+ # old_design=gen/biskotaki/.github/workflows/test.yaml
67+ # new_design=gen/biskotaki/.github/workflows/cicd.yml
68+
69+ # # use whichever exists, else exit with error
70+ # GEN_CI_CONFIG=$([ -f $new_design ] && echo $new_design || echo $old_design)
71+
72+ # # if file not exists explicitly exit with error
73+ # if [ ! -f "$GEN_CI_CONFIG" ]; then
74+ # echo "ERROR: $GEN_CI_CONFIG does not exist"
75+ # exit 1
76+ # fi
77+
78+ # if [ ! $(yq eval 'true' "$GEN_CI_CONFIG") ]; then
79+ # echo "ERROR: $GEN_CI_CONFIG is malformed"
80+ # exit 1
81+ # fi
82+
83+ # ## Run Test Suite against the generated project ##
84+ # - name: Test distributions 'Source', 'Built' and 'edit' (dev env) mode installation
85+ # env:
86+ # TOXPYTHON: "python${{ env.PY_VERSION }}"
87+ # working-directory: gen/biskotaki
88+ # run: |
89+ # tox -e 'edit,sdist,wheel'
90+ # tox -e wheel-test
91+ # tox -e coverage
7892
79- # # Verify all Tox Envs PASS, as intented, out of the box ##
80-
81- # Running Type Check, on src and Test code: Passes
82- - name : ' Mypy: Static Type Checker -> PASS'
83- working-directory : gen/biskotaki
84- run : |
85- tox -e pin-deps -- -E typing
86- tox -e type
87-
88- - name : ' Ruff: Fast Python Linter -> PASS'
89- working-directory : gen/biskotaki
90- run : tox -e ruff
91-
92- # Running Lint Check, on src and Test code: Passes
93- - name : ' Isort, Black: Code Formatter -> PASS'
94- working-directory : gen/biskotaki
95- run : tox -e lint
96- # Running the Build script (sdist and wheel): produces Distro Artifacts: Source (.tar.gz) and Wheel (.whl) files
97- - name : ' Build: sdist, wheel -> PASS'
98- working-directory : gen/biskotaki
99- run : tox -e build
100- # Running Quality Checks against Distro Metadata: Passes with 10/10 score
101- - name : ' Pyroma: Distro Quality -> PASS'
102- working-directory : gen/biskotaki
103- run : tox -e check
104-
105- # Docs Checks: Run Build Docs command, and verify it succeeds
106- - name : ' Sphinx: Build Docs Web Site (html/css/js) -> PASS'
107- working-directory : gen/biskotaki
108- run : |
109- tox -e pin-deps -- -E docs # poetry export
110- tox -e docs
111-
112- - name : Remove requirements file generated with 'poetry export' for Docs
113- # See tox.ini -> testenv.setenv.DEFAULT_REQS_FILE
114- run : rm -f gen/biskotaki/reqs.txt
115-
116- # tox -e graphs
117-
118- # # PUSH to BISKOTAKI REPO ##
119- - name : Push to dedicated branch in biskotaki repo
120- # Pin to v1.7.2 -> 07c4d7b3def0a8ebe788a8f2c843a4e1de4f6900
121- uses : cpina/github-action-push-to-another-repository@07c4d7b3def0a8ebe788a8f2c843a4e1de4f6900
122- env :
123- SSH_DEPLOY_KEY : ${{ secrets.SSH_GITHUB_KEY }}
124- with :
125- source-directory : ' gen/biskotaki'
126- destination-github-username : ' boromir674'
127- destination-repository-name : ' biskotaki'
128- user-email : k.lampridis@hotmail.com
129- user-name : ' Konstantinos'
130- destination-repository-username : ' boromir674'
131- target-branch : ${{ env.branch }}
132- commit-message : ' apply Template from https://github.com/boromir674/cookiecutter-python-package'
93+ # ## Verify all Tox Envs PASS, as intented, out of the box ##
94+
95+ # # Running Type Check, on src and Test code: Passes
96+ # - name: 'Mypy: Static Type Checker -> PASS'
97+ # working-directory: gen/biskotaki
98+ # run: |
99+ # tox -e pin-deps -- -E typing
100+ # tox -e type
101+
102+ # - name: 'Ruff: Fast Python Linter -> PASS'
103+ # working-directory: gen/biskotaki
104+ # run: tox -e ruff
105+
106+ # # Running Lint Check, on src and Test code: Passes
107+ # - name: 'Isort, Black: Code Formatter -> PASS'
108+ # working-directory: gen/biskotaki
109+ # run: tox -e lint
110+ # # Running the Build script (sdist and wheel): produces Distro Artifacts: Source (.tar.gz) and Wheel (.whl) files
111+ # - name: 'Build: sdist, wheel -> PASS'
112+ # working-directory: gen/biskotaki
113+ # run: tox -e build
114+ # # Running Quality Checks against Distro Metadata: Passes with 10/10 score
115+ # - name: 'Pyroma: Distro Quality -> PASS'
116+ # working-directory: gen/biskotaki
117+ # run: tox -e check
118+
119+ # # Docs Checks: Run Build Docs command, and verify it succeeds
120+ # - name: 'Sphinx: Build Docs Web Site (html/css/js) -> PASS'
121+ # working-directory: gen/biskotaki
122+ # run: |
123+ # echo "[INFO] Exporting to pip-installable Requirements for Docs"
124+ # tox -e pin-deps -- -E docs # poetry export
125+ # echo "[INFO] Building Docs"
126+ # tox -e docs
127+
128+ # - name: Remove requirements file generated with 'poetry export' for Docs
129+ # # See tox.ini -> testenv.setenv.DEFAULT_REQS_FILE
130+ # run: rm -f gen/biskotaki/reqs.txt
131+
132+ # # tox -e graphs
133+
134+ # ## PUSH to BISKOTAKI REPO ##
135+ # - name: Push to dedicated branch in biskotaki repo
136+ # # Pin to v1.7.2 -> 07c4d7b3def0a8ebe788a8f2c843a4e1de4f6900
137+ # uses: cpina/github-action-push-to-another-repository@07c4d7b3def0a8ebe788a8f2c843a4e1de4f6900
138+ # env:
139+ # SSH_DEPLOY_KEY: ${{ secrets.SSH_GITHUB_KEY }}
140+ # with:
141+ # source-directory: 'gen/biskotaki'
142+ # destination-github-username: 'boromir674'
143+ # destination-repository-name: 'biskotaki'
144+ # user-email: k.lampridis@hotmail.com
145+ # user-name: 'Konstantinos'
146+ # destination-repository-username: 'boromir674'
147+ # target-branch: ${{ env.branch }}
148+ # commit-message: 'apply Template from https://github.com/boromir674/cookiecutter-python-package'
149+
150+
151+ # #### TEST 2: Generated Project with ./.github/biskotaki.yaml as User Config #####
133152
134153 # # GENERATE Python GOLD STANDARD from TEMPLATE into gen/ ##
135154 # ROOT : gen-gold/biskotaki-gold-standard/pyproject.toml
@@ -148,12 +167,55 @@ jobs:
148167 poetry lock
149168 working-directory : gen-gold/biskotaki-gold-standard
150169
151- # # MKDOCS Checks: Run Build Docs command, and verify it succeeds ##
170+ # MKDOCS Checks: Run Build Docs command, and verify it succeeds ##
152171 - name : ' Mkdocs: Build Docs Web Site (html/css/js) -> PASS'
153172 working-directory : gen-gold/biskotaki-gold-standard
154173 run : |
155- tox -e pin-deps -- -E docs # poetry export
156- tox -e docs
174+ virtualenv env --python='python${{ env.PY_VERSION }}'
175+ source env/bin/activate
176+
177+ echo "[INFO] Installing Rolling Requirements for Docs"
178+ pip install -e .[docs]
179+
180+ echo "[INFO] Building the Docs"
181+ mkdocs build
182+
183+ - run : |
184+ source env/bin/activate
185+ pip list
186+ working-directory: gen-gold/biskotaki-gold-standard
187+
188+ # echo "[INFO] Exporting to pip-installable Requirements for Docs"
189+ # [ OPT 2 ]
190+ # # unless we pin colorama in poetry.lock we
191+ # # export the requirements without hashes
192+ # tox -e pin-deps -- -E docs --without-hashes
193+
194+ # echo "[INFO] Building Docs"
195+
196+ # # pipx install virtualenv
197+ # virtualenv env --python='python${{ env.PY_VERSION }}'
198+ # source env/bin/activate
199+
200+ # echo "[INFO] Installing Pinned Requirements for Docs"
201+ # # unless we pin colorama in poetry.lock it will fail if not 'poetry add' used
202+ # pip install -r reqs.txt
203+
204+ # echo "[INFO] Installing the Package with 'docs' extras"
205+ # pip install -e .[docs]
206+
207+ # echo "[INFO] Building the Docs"
208+ # mkdocs build
209+
210+ # [ OPT 1 ]
211+ # # tox -e docs
212+
213+ # [ OPT 3 ]
214+
215+
216+ # BOTH tox and poetry based method have become unmaintanable
217+
218+ # We introduce a docker-based Mkdocs build and test
157219
158220 # exlude 'site' dir from pushing to biskotaki repo
159221 - name : Exclude 'site' folder, built with Mkdocs, from 'git push'
0 commit comments